0% found this document useful (0 votes)
2 views

Python Exam

This document is a Grade 9 Python coding test for Kitengela International Schools, consisting of a theory section worth 30 marks and a practical section worth 20 marks. The theory section includes definitions, multiple choice questions, features of Python, variable naming rules, applications, fill-in-the-blanks, and true/false statements. The practical section requires students to write Python programs for basic arithmetic operations and user input handling.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Python Exam

This document is a Grade 9 Python coding test for Kitengela International Schools, consisting of a theory section worth 30 marks and a practical section worth 20 marks. The theory section includes definitions, multiple choice questions, features of Python, variable naming rules, applications, fill-in-the-blanks, and true/false statements. The practical section requires students to write Python programs for basic arithmetic operations and user input handling.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

KITENGELA INTERNATIONAL SCHOOLS –

ATHIRIVER
GRADE 9 CODING TEST 1 PYTHON EXAM
Total Marks: 50

Section A: Theory (30 Marks)


Answer all questions

1. Define the following terms (4 marks)

a) High-level language

______________________________________________________________________________

b) Interpreted language

______________________________________________________________________________

c) Variable

______________________________________________________________________________

d) Python input() function

______________________________________________________________________________

2. Multiple Choice Questions (6 marks – 1 mark each)

i. Who is the founder of Python?


A. Elon Musk B. Guido van Rossum C. Dennis Ritchie

D. Mark Zuckerberg

ii. Python was officially released in:


A. 1989 B. 2000 C. 1991 D. 2010

iii. Which of the following is NOT a valid variable name?


A. 2num B. num#1 C. first_name D. user-name

iv. Python is an example of a:


A. Low-level language B. Machine language C. Markup language

D. High-level programming language

1|Page
v. Which of these is NOT a reserved word in Python?
A. age B. print C. while D. if

vi. Which companies use Python?


A. Facebook B. Google C. Dropbox D. All of the above

3. List any four features of Python. (4 marks)


______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
4. Mention three rules to follow when naming a variable in Python. (3 marks)
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

5. List four applications or areas where Python is used. (4 marks)


______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

6. Fill in the blanks (3 marks – 1 mark each):

i. Python is a ___________________________________ typed language.


ii. To install Python, we download it from
________________________________________________________________.
iii. To check if Python is installed, we use the command
___________________________ in CMD.

7. True or False (3 marks – 1 mark each):

i. Python can only be used for game development. (___________)


ii. Variables in Python are case-sensitive. ( _______________)
iii. Python is not suitable for beginners. (________________)

Section B: Practical / Code Writing (20 Marks)


Answer all questions

8. Write a Python program that does the following (12 marks – 3 marks each):

a) Adds two numbers

______________________________________________________________________________
______________________________________________________________________________

2|Page
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

b) Divides two numbers

______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

c) Finds the modulus of two numbers

______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

d) Multiplies two numbers

______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

Note: Use variables for all values and include comments

9. Using the input() function (8 marks – 4 marks each):

i. Write a program that asks the user to enter their name and age and displays them.

______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

3|Page
ii. Ask the user to enter their age, then write a program that calculates and displays the year
they were born. (Assume the current year is 2025)

______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________

4|Page

You might also like