0% found this document useful (0 votes)
2 views1 page

Worksheet 2 - Python

This document is a Python worksheet designed for students to practice coding. It includes questions that require writing code to store a number, identifying errors, explaining data types, creating conditional statements, and developing a program for multiplication. The worksheet is structured to assess understanding of basic programming concepts.

Uploaded by

parrampro
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)
2 views1 page

Worksheet 2 - Python

This document is a Python worksheet designed for students to practice coding. It includes questions that require writing code to store a number, identifying errors, explaining data types, creating conditional statements, and developing a program for multiplication. The worksheet is structured to assess understanding of basic programming concepts.

Uploaded by

parrampro
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

Date: _________________________

Name: ________________________________________________________

Subject: _____________ Class: ____________

Worksheet 2: Python

Q1. a. Write code to store the number 25 in a variable named age.

……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….
……………………………………………………………………………………………………………….

b. Identify the error in this code: print("Hello" + 5).

……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….

c. Explain the difference between an Integer and a String.

……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….
d. Write an if-else statement that prints "Pass" if a score is 50 or above, and "Fail" otherwise.

……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….

e. Create a program that takes two numbers as input and prints their product.

……………………………………………………………………………………………………………….
……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….
……………………………………………………………………………………………………………….

……………………………………………………………………………………………………………….

You might also like