From the course: Programming Foundations: Fundamentals

Challenge: Guessing game - Python Tutorial

From the course: Programming Foundations: Fundamentals

Challenge: Guessing game

(upbeat music) - Hi folks, it's time for another challenge. And guess what? We're going to create a guessing game. Using your knowledge of relational operators, Boolean expressions and the powerful if else statement, I want you to create program, with the following requirements. First it asks the user, what's my favorite food? If the user enters the name of your favorite food, output, Yep! So amazing! If the user doesn't enter the name of your favorite food, output, Yuck! That's not it! Regardless of what the user enters, output, Thanks for playing! You may find it helpful to plan your program on a sheet of paper first. Think about what functions you'll need to call and what variables you'll need to create. This will make it easier for you when you start to write your code in the IDE. Keep in mind there's no single one way to do this. Just have fun and try your best. But make sure you watch the solution video, where I'll share how I tackled the problem.

Contents