Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialernestmurewa
3,889 PointsWhat will be printed when the following code is executed?
def check_lottery_number(num): lottery_numbers = [77, 24, 8, 18, 5, 64] if num in lottery_numbers: print(f'{num} is a winning number!') else: print(f'Try again, {num} is not a winning number.')
check_lottery_number(3)
1 Answer
Daniel Turato
Java Web Development Techdegree Graduate 30,124 PointsIt would be "Try again, 3 is not a winning number."
ernestmurewa
3,889 Pointsernestmurewa
3,889 Pointsbut there is no 3 there?
Daniel Turato
Java Web Development Techdegree Graduate 30,124 PointsDaniel Turato
Java Web Development Techdegree Graduate 30,124 PointsThere is, this is how I go to my answer: