Re: python code

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Amit Nepal
Date:  
To: Michael Havens, Main PLUG discussion list
Subject: 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