Day Weekend Sun
- Describe briefly what you’ve done.
Today, I did the weekend mini-project (How to Travel to HKIS). Here are the screenshots:
Flow Chart I designed:
The code on PyCharm Edu.
- This is the code:
#this is the "How to Travel to HKIS Game" #By:Bernard Luk userchoice = raw_input ("Hi. Do you want to travel to HKIS? Yes or No?: ") if userchoice == "No" or userchoice == "no": print "Then go away" elif userchoice == "Yes" or userchoice == "yes": question1 = raw_input ("Do you have a driver? Yes or No?: ") if question1 == "Yes" or question1 == "yes": print "Then ask your driver to drive you to HKIS!" elif question1 == "No" or question1 == "no": question2 = input("How much money do you have?: ") if question2 >= 80: print "Then take a Taxi, and ask him to drive you to HKIS" elif question2 < 80: question3 = raw_input ("If there an MTR nearby? Yes or No?: ") if question3 == "No" or question3 == "no": print "Then take a bus. Before getting on a bus, make sure to check the bus route to see if there is Redhill, TaiTam" elif question3 == "Yes" or question3 == "yes": question4 = raw_input ("Are you currently in Hong Kong Island? Yes or No?: ") if question4 == "No" or question4 == "no": print "Look for the Island Line on the MTR. Then go to WanChai station. When you get to WanChai station, take the mini bus and get off at Red Hill, Tai Tam" extra = raw_input ("Are you at HKIS? Yes or No?: ") if extra == "Yes" or extra == "yes": print "Yay!" elif extra == "No" or extra == "no": print "Oh Sorry. Not my fault" else: print "No idea what you're saying" elif question4 == "Yes" or question4 == "yes": print "Go to the WanChai station. When you get to WanChai station, take the mini bus and get off at Red Hill, Tai Tam" question5 = raw_input ("Are you at HKIS? Yes or No?: ") if question5 == "Yes" or question5 == "yes": print "Yay!" elif question5 == "No" or question5 == "no": print "Oh Sorry. Not my fault" else: print "No idea what you're saying" else: print "No idea what you're saying" else: print "No idea what you're saying" else: print "No idea what you're saying" else: print "No idea what you're saying" else: print "No idea what you're saying"