0% found this document useful (0 votes)
47 views2 pages

Grade 10 - Computer - Revision Worksheet

This document is a revision worksheet for Grade 10 Computer Programming. It includes multiple-choice questions on Python syntax, operators, and code outputs, as well as programming exercises for addition, average calculation, and checking if a number is odd or even. The worksheet aims to reinforce students' understanding of basic programming concepts in Python.

Uploaded by

I3hadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views2 pages

Grade 10 - Computer - Revision Worksheet

This document is a revision worksheet for Grade 10 Computer Programming. It includes multiple-choice questions on Python syntax, operators, and code outputs, as well as programming exercises for addition, average calculation, and checking if a number is odd or even. The worksheet aims to reinforce students' understanding of basic programming concepts in Python.

Uploaded by

I3hadi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Grade 10 – Computer– Revision Worksheet

Programming the computer

Name:.hadi shatat..............................
Class:.10.......................

Q1. Choose the correct answer.


1. Which operator has higher precedence in the following list
a. - Subtraction b. + Addition a. ( ) Parentheses

2. What is a correct syntax to output "Hello World" in Python?


a. print ("Hello World") b. p ("Hello World") c. echo "Hello World

3. Which operator is used to multiply numbers?


a. % b. * c. #

4. What is the missing part of the code below to output "Hello World".

("Hello World")
[Link] b. add c. sum

5. What is the output of the following code?

x = 36 / 6+ 2
print(x)

a. 8.0 b. 36 c. 0

6. What is the output of the following code?

x = 25 / 5-(3+ 2)
print(x)

a. 0.0 b. 5 c. 25
7. What is the output of the following code?

a = 5
b = 3
if b > a:
print("b is greater than a")
else:
print("a is greater than b")

a. a is greater than b. b is greater than a c. 8

Q2. Write a Python program to find the addition of two


numbers.
x = 25 + 5
…………………………………………………………………
print(x)
…………………………………………………………………
…………………………………………………………………
…………………………………………………………………

Q3. Write a Python program to find the Average of three numbers.


num1 = 3
…………………………………………………………………
num2 = 5
…………………………………………………………………
num3 = 10
avg = (num1 + num2 + num3)/3
…………………………………………………………………
print('The average of numbers = %0.2f' %avg)
…………………………………………………………………

Q4. Write Python Program to Check if a Number is Odd or Even.


num = int(input("Enter a number: "))
...........................................................................
if (num % 2) == 0:
print("{0} is Even".format(num))
…………………………………………………………………
else:
…………………………………………………………………
print("{0} is Odd".format(num))
…………………………………………………………………
…………………………………………………………………

You might also like