Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Groups
Community ▾
A
A
Problems
/
Python Basics
/
Input and Output
Input and Output
Python Programming
+ Upload a Problem
More in Python Basics
Getting Started with Python
Variables and Data Types
Operators and Expressions
Input and Output
Strings
Conditionals: if, elif, else
Loops
Lists
Functions
Mini Projects
All Levels
Middle Stage (6–8)
High School (9–10)
High School (11–12)
Undergraduate
General
All
Easy
Medium
Hard
Sort
Mixed
Newest first
Oldest first
A to Z
21 problems
Type:
Any
Conceptual
Numerical
Python-Coded
1.
Write a program that asks for the length and the width of a rectangle in centimetres, as numbers…
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Medium
2.
A program asks two questions. The Input box has these two lines: India and then Pune.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Easy
3.
A student wrote a program that asks for the price of an item.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Medium
4.
Predict the output
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Getting Started with Python, Input and Output
StemPy Lab
Easy
5.
Which function (int or float) would you use to read each value?
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Medium
6.
A bill is 1260 rupees. A tip of 10 percent is added, and 5 friends share the total equally.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Hard
7.
A bus travels at 60 km/h for 2.5 hours. Write a program that reads the speed and the time, and…
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Medium
8.
Read three marks and show their average, rounded to two places.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Medium
9.
Write a program that reads the radius of a circle in centimetres and shows its area, with A = 3.14…
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Medium
10.
Ask for the user's age and show how old they will be in ten years.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Easy
11.
Write a program that reads a temperature in degrees Celsius and shows it in degrees Fahrenheit…
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Medium
12.
Write a program that reads two whole numbers and shows their sum.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Easy
13.
A program reads two numbers with a = input() and b = input(), then shows a + b.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Easy
14.
Write a program that asks What is your name?
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Input and Output
StemPy Lab
Easy
15.
How many lines does this program show, counting a blank line as a line?
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Getting Started with Python, Input and Output
StemPy Lab
Medium
16.
Write a program that shows a poem of four lines, with a blank line between the two verses.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Getting Started with Python, Input and Output
StemPy Lab
Medium
17.
Use sep to show 2026-10-11. Then use end so that Hello and world are on the same line.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Getting Started with Python, Input and Output
StemPy Lab
Medium
18.
Make a name card. Three of the lines come first. Then a blank line. Then the school.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Getting Started with Python, Input and Output
StemPy Lab
Medium
19.
Show the line 12 + 7 = 19. The answer must be worked out by Python.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Getting Started with Python, Input and Output
StemPy Lab
Easy
20.
Print a staircase with four steps. The first line has one star, the second has two, and so on.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Getting Started with Python, Input and Output
StemPy Lab
Easy
21.
What does each line show?
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Getting Started with Python, Input and Output
StemPy Lab
Easy