Re: python code

Página superior
Adjuntos:
Obtener este mensaje como un correo
+ (text/plain)
+ (text/html)
+ (text/plain)
Eliminar este mensaje
Responder a este mensaje
Autor: Amit Nepal
Fecha:  
A: Michael Havens, Main PLUG discussion list
Asunto: Re: python code
Sorry , I meant this, like Jason mentioned the input prompt must be
inside the while loop in order for it to wait for the user input :

print("Welcome.")
g = input("Guess the number: ")
     guess = int(g)


while guess != 5
     print("Guess again.")
     g = input("Guess the number: ")
     guess = int(g)
     print("Correct")


*Thanks
Amit
*
On 4/13/2015 12:21 PM, Michael Havens wrote:
> print("Welcome.")
> g = input("Guess the number: ")
> guess = int(g)
>
> while guess != 5
>     print("Guess again.")
>     guess = int(g)
>     print("Correct")


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss