Ask
your own question, for FREE!
Computer Science
16 Online
I need help with Python computers. With Else statements. num = 8 if num == 1: print("One") else: if num == 2: print("Two") else: if num == 7: print("seven") else: if num == 8: print("eight") the program is saying there is an invalid syntax.
Still Need Help?
Join the QuestionCove community and study together with friends!
actually 26 % 2 is evaluated to 0...
@hlubi you cannot use the if else for multiple conditions. you need to use elif instead. if condition 1: elif condition 2: elif condition 3: else: (indent) if last condition:
if you're still stuck I can send you a pic of the code I re-wrote but I'd like you to give it a try first
Can't find your answer?
Make a FREE account and ask your own questions, OR help others and earn volunteer hours!
Join our real-time social learning platform and learn together with your friends!
Join our real-time social learning platform and learn together with your friends!
Latest Questions
Kimmee1001:
Who or what is ultimately responsible for Romeo and Juliet's deaths?
EdwinJsHispanic:
is it normal to have high expectations, like expecting your partner to have time
gelphielvr:
Advice for cramming 70 vocab terms each week? Taking med term this year and we have to memorize about 70+ vocab terms per week and im having trouble studyin
EdwinJsHispanic:
I lowk need help deciding what I should write/type on this essay about why teache
GRIZZLEY19:
Let me know what y'all think about the story Image waking up and seeing a family in the dark.
VERNEISH:
Two objects are moving along separate linear paths where each path is described by position, d, and time, t.
12 hours ago
1 Reply
0 Medals
1 day ago
4 Replies
1 Medal
1 day ago
4 Replies
0 Medals
17 hours ago
3 Replies
0 Medals
1 day ago
22 Replies
6 Medals
1 week ago
1 Reply
0 Medals