Page 70 - CloudGPT_C8_Flipbook
P. 70
Periodic Assessment 1
(Based on chapters 1 to 4)
A. Write the description for the following:
1. int
2. float
3. char
4. str
5. bool
B. Which of the following variable names are incorrectly named according to Python's naming
conventions?
1. 2ndVariable 2. my-variable 3. _myVariable
4. myVariable 5. my_variable 6. MyVariable
C. Write the Algorithm for the given pseudocode of determining the largest of three numbers.
Program Start
INPUT num1, num2, num3
IF num1 >= num2 AND num1 >= num3
THEN
PRINT "num1 is the largest."
ELSE
IF num2 >= num1 AND num2 >= num3
THEN
PRINT "num2 is the largest."
ELSE
PRINT "num3 is the largest."
ENDIF
Program End
68 Premium Edition-VIII

