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:
![](https://hi-static.z-dn.net/files/d7d/823777fcbf7cbdabad2bd49f3acde5de.jpg)
Similar questions
English,
1 month ago
English,
1 month ago
Business Studies,
1 month ago
Hindi,
3 months ago
English,
3 months ago
History,
11 months ago
Political Science,
11 months ago