Computer Science, asked by nandhukarnaa, 5 hours ago

Print python program
from X to Y​

Answers

Answered by anindyaadhikari13
3

\texttt{\textsf{\large{\underline{Solution}:}}}

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=' ')

\texttt{\textsf{\large{\underline{Logic}:}}}

  • 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