Computer Science, asked by Nandhan10, 9 months ago

Print natural numbers from 1-100

Computer--Problem Solving Using computer

Please send me the answers in a written notebook. This question is from the textbook named PYTHON CLASS X. please send the answers....​

like flow chart

Answers

Answered by sarkarharsh708
1

Answer:

first_number = 1

for i in range(100):

i += first_number

print (i)

Explanation:

in the first line, you are assigning the value 1 to the variable first_number

in the next line, you are creating a loop where the value of i is added to the range of number 0, 1, 2, 3... 99... and print the value

if you calculate, 1 added to each of the number will give you the series 1, 2, 3... 100

Similar questions