Unit 3.1
Unit 3.1 Variables and Assignment 1 Hacks
- You want to store the number of apples in a shop. What is the best variable name and data type?
- numApples, integer (correct!)
- You are storing true or false in a variable that asks if the classroom is cold. What is the best variable name and data type?
- isCold, boolean (correct!)
- Is itisRainingtodayinsandiego a better option than isRaining?
- Which of the following types of data is best for a true or false question?
- What is the difference between an integer and string of numbers?
- An integer can be changed with addition and subtraction and a string is a set number or string of letters. (correct!)
My Own 3 Questions:
- Mr. Yeung and Mr. Mortensen want to keep track of all their students grade levels: sophomore, junior, senior. What is the best variable name and data type?
a. GradeLevel, integer
b. gradeLevel, string
c. gradelevelofmortandyeungsstudents, string
d. gradeLevel, float
<details closed>
Click for the answer!
b
</details>