HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClassesGroups

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Blog

Account

  • Dashboard
  • My Content
  • Profile
  • Log in
© 2026 senLearn. All rights reserved.HelpAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /Python Basics
  3. /Input and Output

Input and Output

Python Programming
+ Upload a Problem
More in Python BasicsGetting Started with PythonVariables and Data TypesOperators and ExpressionsInput and OutputStringsConditionals: if, elif, elseLoopsListsFunctionsMini Projects
21 problems
Type:
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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy 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 OutputStemPy LabStemPy Lab
Easy