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

I need some help please. I don't understand this. :)
Graph: y < 1/3x+1/2 can someone graph this on a actual graph for me
Which of the following employees derives their income from a fee for the items sold? a. commission b. piece rate C. salaried d. tip ut
Help Pleasee ASAP !!
Name the excretory organ?qasfioksag all can com e in the mee t​
does anyone know the answer?
4² ×2³ ×81 divided by 27×8×3
Triangle PQR is scaled up by a factor of 2 and then reflected about the y axis and is named as triangle XYZ. Which statement is true?
What is the area of the figure below? 16 square units 14 square units 10 square units 12 square units
which is a source of land pollutionAnswer: D"Fertilizer running off from a large agricultural farm."​