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?
      1. 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?
      1. isCold, boolean (correct!)
  • Is itisRainingtodayinsandiego a better option than isRaining?
      1. No (correct!)
  • Which of the following types of data is best for a true or false question?
      1. boolean (correct!)
  • What is the difference between an integer and string of numbers?
      1. 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:
  1. 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>