#QUESTION ONE person = input('Please enter your name:') print('Hello', person,'. How are you today?') #QUESTION TWO emotion = input('Please enter happy, sad or neither:') if emotion == 'happy': print('Well, it is great to hear that you are so chipper',person,'! Shall we continue?') else: print('Sorry to hear that. Hopefully we can help to cheer you up',person,'!') print('Okay, just a few more questions before we make a few recommendations on how to make your life more awesome!') #QUESTION THREE gender = input('Write M if you are a male or F if you are a female:') #QUESTION FOUR DOB = input('Please enter your date of birth (01/30/1985):') #QUESTION FIVE currentcity = input('Where do you live? Enter SF, NYC, LA, CHI, BOS or Other:') if currentcity == "Other": input('Where do you live? Just play along...:') else: print('Thanks,',person,". Continue on to learn more!") #CONTINUE BUTTON
Jump to Post
Inputs can be handled by the Entry() widget and bound the return key.
For an example see:
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.