Python - IF ELSE Statements Tutorial 1 (Is It Sunny?)

Veröffentlicht am: 06 Januar 2020
auf dem Kanal: Geek Tutorials
15,747
163

Learn how to write an IF ELSE statement in Python. This video tutorial will ask the user what the weather is doing outside and give them an option on what they should do based upon that decision.

⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! https://www.kite.com/get-kite/?utm_me...

~ CODE ~

Ask the user what the weather is like
weather = input("Is it sunny outside today: ")

if weather == "yes":
print("You should go to the beach.") # The user will only go to the beach if it's sunny
else:
print("You should stay indoors and do some gaming.") # Anything other than sunny, means they stay indoors


Auf dieser Seite können Sie das Online-Video Python - IF ELSE Statements Tutorial 1 (Is It Sunny?) mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Geek Tutorials 06 Januar 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 15,747 Mal angesehen und es wurde von 163 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!