You are on page 1of 1

SSG 215 Exam Tutorial Questions 2024

1. Explain primitive data types and non primitive data types in python with examples.
2. Write a python statement that prints out the data type of ‘home’.
3. List the purposes of comments in a python code.
4. What is an algorithm?
5. List any four (4) flowchart symbols with their names, symbols and functions.
6. Write an algorithm to find the greater number between two numbers and draw a
flowchart for the algorithm.
7. Explain mutability in python.
8. My electricity bills for the last three months have been $23, $32 and $64. Write a python
code to calculate the mean, and use print() to view the result.
9. List the data structures in python
10. What are the break and continue statements used for?
11. Explain three (3) real life applications of loops in programming.
12. Given the lengths of three sides of a triangle, write an algorithm to determine whether it
is an equilateral, isosceles, or scalene triangle.
Hint:
Equilateral triangle: all lengths are equal,
Isosceles triangle: only two lengths are equal
Scalene triangle: all the three lengths are different
13. Construct the flowchart for the algorithm in question 12 above.
14. Write a python program that asks for three numbers, and lists all three numbers, and their
sum
15. Given `food_cost` as $900 and `light_cost` as $950. Write python code to check if the
following statements are True or False:
a. Is the cost of food lower than the cost of light?
b. Is the cost of light greater than $900?
c. Is the cost of food greater than $1000 or the cost of light less than $900?
16. Use a for loop to print numbers from 1 to 10 but skip odd numbers using the continue
statement.
17. Differentiate between a formal parameter and and actual parameter in a python function

You might also like