Q3

Week 3 Quiz: Variables & Data Types

Test your understanding of variables and data types in Arduino programming

32-Week Course • Semester 1

Quiz Instructions

  • • This quiz covers material from Week 3: Variables & Data Types
  • • Answer all questions to the best of your ability
  • • Your responses will be emailed to your instructor for review
  • • Take your time and think carefully about each answer
  • • You can review the lesson material if needed before submitting

Student Information

Question 1: Variable Declaration

Which of the following correctly declares an integer variable named "count" with an initial value of 10?

Question 2: Data Types

Which data type is best for storing decimal numbers in Arduino?

Question 3: Boolean Values

What are the two possible values for a boolean (bool) data type?

Question 4: Variable Scope

Where should global variables be declared in an Arduino program?

Question 5: Mathematical Operations

What is the result of the expression: 15 % 4 (modulo operator)?

Question 6: String Data Type

How do you declare a String variable containing the text "Arduino"?

Question 7: Code Analysis

Explain what happens in this code snippet:

int temperature = 25;
temperature = temperature + 5;
Serial.println(temperature);

Question 8: Data Logger Project

Describe the personal data logger you created for the hands-on activity. What data did you choose to track and what calculations did your program perform?