Print python program
from X to Y
Answers
Answered by
3
Here comes the solution to the question -
x=int(input('Enter start value - '))
y=int(input('Enter end value - '))
print(f'Numbers from {x} to {y} are - ')
for i in range(x,y+1):
print(i,end=' ')
- Accept X and Y from user.
- Repeat from i = X to Y =>
- Display the value of i
- Increment the value of i.
See the attachment for output.
Attachments:
Similar questions
Social Sciences,
1 month ago
Music,
1 month ago
History,
1 month ago
Hindi,
2 months ago
English,
2 months ago
History,
9 months ago
Political Science,
9 months ago