first hw batch 15.3.25 at 11:09
This commit is contained in:
commit
288c7e127a
10 changed files with 73 additions and 0 deletions
10
py/IfElseStatements/challenge1.py
Normal file
10
py/IfElseStatements/challenge1.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Question: Ask if the user likes pizza. If they answer “yes” display “I like pizza too”, otherwise display “My favourite food is pizza.”
|
||||
|
||||
# Ask the user if they like pizza
|
||||
response = input("Do you like pizza? (yes/no): ").strip().lower()
|
||||
|
||||
# Check the response and display appropriate message
|
||||
if response == "yes":
|
||||
print("I like pizza too!")
|
||||
else:
|
||||
print("My favourite food is pizza.")
|
Loading…
Add table
Add a link
Reference in a new issue