Logical Operators
Objective
Introductory Problem
sent = input("Have you snapped with your friend for the past 3 days? ")
if sent == "yes":
print("you snapped with your friend")
elif sent == "no":
print("you have not snapped with your friend")
received = input("Has your friend snapped with you for the past 3 days? ")
if received == "yes":
print("your friend snapped with you")
elif received == "no":
print("your friend has not snapped with you")
if sent == "yes":
if received received == "yes":
print("you started a Snapstreak!")Example 1
Example 2
Example 3
Last updated
Was this helpful?