emikey emikey
  • 20-10-2017
  • Computers and Technology
contestada

I am having trouble figuring out how to write a while loop in Python. Can someone help me?

Respuesta :

zrh2sfo
zrh2sfo zrh2sfo
  • 20-10-2017
#!/usr/bin/python
 
count = 0
while (count < 9):
    print 'The count is:', count
   count = count + 1

print "Goodbye!"

The output should look like this:
The count is: 0
The count is: 1
The count is: 2
The count is: 3
The count is: 4
The count is: 5
The count is: 6
The count is: 7
The count is: 8
Goodbye!


Answer Link

Otras preguntas

Is N2 just a molecule, or is it a compound?
Select the correct answer. Read this excerpt from Abraham Lincoln's Emancipation Proclamation. What inference, or conclusion, can you draw from this passage? I
Baaaaba BOOOT jfajifaj ji dijadiasojd jasd joia
The temporal lobe is responsible for which functions?
Describe the Boston Tea Party in your own words
how do we clean our ear​
HELP PLEASE ASAP By construction, copy the anglos given Leave a construction arcs in your final figure x Costa R2
fjjhtfgffcvhtcxtvhjndghcgxrh
The ratio 3 : 7 and 6 : 14 are equivalent ratios. Is the ratio 4 : 8 equivalent to these? Explain your reasoning.
why would many immigrants support texas annexation to the united states brainly