'Write a Python Program to print all the numbers from 10 to 20 using for statement;'
Added by Joe E.
Step 1
In Python, the range function generates a sequence of numbers starting from the start value to the end value - 1. So, to include 20 in our range, we need to set the end value as 21. Then, we use a for loop to iterate over this range. For each iteration, we print Show more…
Show all steps
Your feedback will help us improve your experience
Sanchit Jain and 98 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write a python program to print the square of all numbers from 0 to 10.
Harris K.
Write a python program to print numbers from 100 to 50 using for loop.
Shelayah R.
Find the output of the program given below. 10 Let $A=1$ $20 \mathrm{READ} \mathrm{P}, \mathrm{Q}$ 30 DATA 2,8 40 Let $\mathrm{R}=\mathrm{P}$ 50 Let $R=R \star P$ 60 Let $A=A+1$ 70 If $\mathrm{A}=\mathrm{Q}$, then GOTO 80 ELSE GOTO 50 80 PRINT R 90 END (1) 64 (2) 256 (3) 512 (4) 128
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD