What is the difference between = in math and = in Python?
- A.There is no difference
- B.In Python it is an instruction: work out the right side, then store the result in the named memory on the left
- C.In Python it means "is approximately equal to"
- D.In Python it only works with whole numbers
Answer Why?
After these three lines, what is total?
total = 10
total = total + 5
total = total + 5
- A.10
- B.15
- C.20
- D.It causes an error because total is used to define itself
Answer Why?
In the line reflectance = Reflectance.get_default_reflectance() what is the difference between the two spellings?
- A.Nothing — Python ignores capital letters
- B.Capitalized Reflectance is the class; lowercase reflectance is the variable holding the sensor you will use
- C.The capitalized one is a typo that Python fixes
- D.Capitalized names are for numbers, lowercase for text
Answer Why?
What is the value of 10 + 4 * 2 ?
- A.28
- B.18
- C.80
- D.16
Answer Why?
Your white reading is 0.2 and your black reading is 0.8, and you want the midpoint (0.5). Which line gives it?
- A.threshold = white + black / 2
- B.threshold = (white + black) / 2
- C.threshold = white + black // 2
- D.Both of the first two work
Answer Why?