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

Beginner Python Worksheet Activities

This document is a Python worksheet designed for beginners, consisting of four parts: writing output, evaluating boolean expressions, identifying errors in code, and writing specific code snippets. It includes exercises that require the user to print variables, perform arithmetic operations, and use boolean operators. Additionally, it prompts users to write code for user input and comparisons.

Uploaded by

GAYANHNA gUNARAT
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)
5 views2 pages

Beginner Python Worksheet Activities

This document is a Python worksheet designed for beginners, consisting of four parts: writing output, evaluating boolean expressions, identifying errors in code, and writing specific code snippets. It includes exercises that require the user to print variables, perform arithmetic operations, and use boolean operators. Additionally, it prompts users to write code for user input and comparisons.

Uploaded by

GAYANHNA gUNARAT
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

Python Worksheet for Beginners

Part A – Write the Output

1.
x = 5
print(x)

2.
name = "Lara"
print(name)

3.
a = 10
b = 2
print(a + b)

4.
price = 50
discount = 20
print(price - discount)

5.
x = 5
y = 3
print(x > y)

Part B – Boolean Operators (Write True or False)

5 > 2 and 3 > 1 → ______

4 == 4 or 5 == 10 → ______

not(3 < 1) → ______

10 > 50 and 2 == 2 → ______

7 != 7 or 1 < 2 → ______

Part C – Find the Error (if any)

my name = "Ravi"

5 = x
print("Hello)`

total = 10 +

2print("Hi")

Part D – Write the Code

1. Ask the user to enter their name and print: Hello

2. Ask the user to enter two numbers and print the sum.

3. Write code to check if a number is equal to 10.

4. Write code to check if a number is not equal to 7.

5. Create two variables x = 8 and y = 3 and print if x is greater than y and y is less than x.

You might also like