Skip to content
Debug 5.4. Birthday Boolean with starter code
  • Pages
    • The Task
    • icon picker
      Python Starter Code
    • Code Clips

Python Starter Code

Copy and paste the code below into your main.py file before you begin the task.
# print out a blank line
print('\n')
# ask the user if today is their birthday (true or flase) answer
birthday = bool(int(input('Is today your birthday, 1-True or 0-False? ')))

# print out a blank line
print('\n')

# checks the user response
# if it is true it will display Happy Birthday.
# otherwise display good wishes message.

if birthday = False :
print("Happy Birthday!")
print("Hope you have the best day")
else :
print("Have a great day when it comes.")

# print out a blank line
print('\n')
 
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.