Test: Understanding of basic Python concepts through simple coding tasks


🔹 Section 1: Variables, Output, Input
Q1. Create and Display
Create a variable called
name
and assign your name to it.Print:
Hello, [name]!
Q2. Simple Calculator
Ask the user for two numbers.
Add them and print the result.
🔹 Section 2: if
Conditions
Q3. Voting Eligibility
Ask the user for their age.
If age >= 18, print “Eligible to vote.”
Otherwise, print “Not eligible.”
Q4. Maximum Finder
Ask the user to enter two numbers.
Print the greater number.
🔹 Section 3: for
Loop
Q5. Print Numbers 1 to 5
- Use a
for
loop to print numbers from 1 to 5.
Q6. Sum of First 10 Numbers
- Use a
for
loop to find the sum of numbers 1 to 10.
🔹 Section 4: while
Loop
Q7. Password Check
- Ask the user to enter a password until they type
"python123"
.
Q8. Counter
Ask the user to enter a number.
Count down to 0 using a
while
loop.
Subscribe to my newsletter
Read articles from Arzath Areeff directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Arzath Areeff
Arzath Areeff
I co-founded digizen.lk to promote online safety and critical thinking. Currently, I’m developing an AI app to fight misinformation. As Founder and CEO of ideaGeek.net, I help turn startup dreams into reality, and I share tech insights and travel stories on my YouTube channels, TechNomad and Rz Omar.