← Back to list

012625_Python_if/elif/else

Terry · 2025-01-27 04:14 · 0 claps · 0.6 min read
#python #if #life #else
Open on Medium ↗

012625_Python_if/elif/else

print('''       )  (
     (   ) )
      ) ( (
 mrf_______)_
 .-'---------|  
( C|/\/\/\/\/|
 '-./\/\/\/\/|
   '_________'
    '-------'
''')
print("Welcome! It's a Sunday morning of January 26, 2025.")
print("Your mission is to spend your morning peacefully sipping coffee.")
cafe = input("You just got up from bed, and you need to decided which cafe you want to go. \nType Starbucks or Twosome Place.\n"
      )
if cafe == str("Starbucks"):
      print("Wrong choice, you're dead.")
else:
      drink = input("You're now in the cafe. What do you want to drink?"
                    "Type A for 'hazeulnut-flavored iced americano', B for 'signature hot cafe latte',"
                    "or C for 'banana-flavored iced americano'.\n"). lower()
      if drink == "A":
            print("Wrong choice, you're dead.")
      elif drink == "B":
            print("Wrong choice, you're dead.")
      elif drink == "C":
            print("Great choice, enjoy your coffee and have a happy Sunday morning!")
      else:
            print("You chose a menu that doesn't exist. You're dead.")

메타데이터
post_id
9a8b9cdad92f
slug
012625-python-if-elif-else-9a8b9cdad92f
url
https://medium.com/@mnisi0128/012625-python-if-elif-else-9a8b9cdad92f
canonical_url
https://medium.com/@mnisi0128/012625-python-if-elif-else-9a8b9cdad92f
author_url
https://medium.com/@mnisi0128
status
ok
fetched_at
2026-06-26 12:24:55