mahantsmith47 mahantsmith47
  • 08-08-2020
  • Computers and Technology
contestada

Rewrite following program using for loop no=3456 while no>0 : print(no%10) no=no/10

Respuesta :

tonb
tonb tonb
  • 09-08-2020

Answer:

no=3456  

for x in reversed(str(no)):

 print(x)

Explanation:

If you turn the number into a string and then reverse it, you can achieve the same output.

Answer Link
camdenihatecody camdenihatecody
  • 01-09-2020
No =3456
Your welcome I just took a test with this on it
Answer Link

Otras preguntas

what is the value of 6X + 7 y - 5 when x equals two and Y equals 3​
What would be a equation for (5,2) and (0,7)?
Please helppp it’s important
The giant planets are made of "gases," ______, and ______. "chocolate," "peanut butter" "ices," "rocks" "plasma," "basalt" "rocks," "dark matter"
8.1grams of xso4.7H2O when heated at 90°c for 15minutes gave 4.9grams when heated further at 120°c.If x is 72,calculate the amount of water of crystallization i
15 out of 200 campsites at a campground are reserved for campers with pets. Express this as a ratio in simplest terms.
can you explain how the 1.a equals 14/50
You are driving home from school steadily at 100 km/h for 180 km . It then begins to rain and you slow 63 km/h instantly. You arrive home after driving 4.0 hour
RSM problem need help (picture included) #2
13) Which best describes the difference between these two passages? A) Truth's account of racism is discussed generally, while Dunbar's account of racism is fil