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 name of first electroechanical computer​
Two sentences with allocate
How did Napoleon lure his enemy to attack him ?
Use the pronouns donde, que, and quien(es) to combine the two shorter sentences into a more sophisticated sentence. Modelo: Los turistas quieren tomar un vuelo
6. Which characteristic of the 1920s is illustrated by the trial of Sacco and Vanzetti? a. Hostility toward woman's suffrage b. Support for segregation C. Oppos
If P = (8,2), Find: r270 (P)
If f(x) = 3x - 1 and g(x) = x + 2, find (f+ g)(x).
BRAINLIEST a. 7 sqrt of 2b. 14c. 7d. 7 sqrt of 3​​
Although both documents were intended to persuade, the styles of The Declaration of Independence and thePreamble were different because _____. a. Jefferson used
Please answer this quick