Answer to Question #257575 in Python for Isabel Cortez

Question #257575

ce

Back to Timeline



brightness_2


notifications


User


list

Details

Code

2. How a Coder Counts

by CodeChum Admin


Instructions:


Make a variable and assign it to an input() function that will accept an integer value. Make sure that the value is now holding a real integer and not just a default string, so make use of what you’ve learned on typecasting your input() functions on the past lessons.

Create a for loop that will print out numbers starting from 0 until the value of the inputted integer, each printed on separate lines. Make use of the range() function well in performing this task.

Instructions


Input

A line containing an integer.

10


Output

Multiple lines containing an integer.


1

2

3

4

5

6

7

8

9

10


1
Expert's answer
2021-10-28T14:18:04-0400
n = int(input())


for i in range(n+1):
    print(i)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog