Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Unit 1 Quiz

1. What are Booleans?


A. True and False
B. If, Elif, Else statements
2. How do you make single line comments?
A. Start off with ...
B. Start off with #
C. Start off with print
3. What is the purpose of single/multi line comments?
A. Decorates my code and makes it look pro
B. Helps the programmer understand what is happening with his/her
code
C. Helps the computer understand what is happening with the
code
4. How do you write (5 cubed) in Python language?
A. 5 * 2
B. 5 ** 2
C. 5 ** 3
D. 5 * 5
5. What does (print 8 % 2) print?
A. 1
B. 2
C. 0
D. 3

Unit 1 Exercise
1. Mind blown. Take your shoe size. Times by 5. Add 50. Times by

20. Add 1015. Subtract yr you were born. Answer = your shoe
size and your age. Compute calculations using Python and print
the final answer.
2. Using Python, calculate average of your grades last semester.
Print out the final answer.

#You must show your instructor your exercise codes before


moving onto your next lesson. Without the instructors
approval, you will not be checked off for lesson 1. Remember
to save your code to a file!

You might also like