Question #220638

write a program that displays the following number sequence. make sure there is no extra comma.(2,2.25,2.50,2.75,..,4) in python loop


Expert's answer

i=2
while i<4:
    print(i, sep='', end=', ', flush=True)
    i+=0.25
    
print(4.0)

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!

LATEST TUTORIALS
APPROVED BY CLIENTS