esquiveljadyn7939 esquiveljadyn7939
  • 30-09-2021
  • Computers and Technology
contestada

write a while loop that prints from 1 to user_num, increasing by 1 each time.

Respuesta :

holmtheditto
holmtheditto holmtheditto
  • 30-09-2021

Answer:

Python:

count = 0

while count <= user_num:

print(count)

count += 1

JavaScript:

let count = 0

while (count <= user_num) {

print(count)

count++

}

Explanation:

Not sure what language you asked for, but I wrote it in Python and JavaScript. Make sure to indent for the python one.

Answer Link

Otras preguntas

I-Ready What is the area of this trapezoid
In economics, what term refers to all natural resources
I really need help on this it’s pothagorem theory and I really struggle with it
What term describes the economy of a country which produces a wide variety of goods and services? (3 points)
In 40 years, what will people be nostalgic for?
John has worked operating heavy machinery for the past few years. He's decided to come to college because he doesn't want to do that kind of work anymore. Becau
Read the passage from American plague which sentence contains a central idea of the passage
50 POINTS AND BRAINLIEST Which sentence contains an example of hyperbole? Inaugural Address by John F. Kennedy, January 20, 1961 (excerpt) Let the word go forth
what is the similarity and difference between the Korematsu case and the Schenck case?
Where did Bimbi take Tito just as Tito was becoming weaker, and where did Tito end up?