Need help!! | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
4th Jun 2018, 6:51 PM
Snowflake C
Snowflake C - avatar
2 Réponses
+ 1
You are getting errors because 1) You didn’t indent the second if statement in the function 2) The second if statement doesn’t have any code so put the pass keyword inside it def mood(): if emoji == "1": ... if emoji == "2": pass Because emoji is a global variable you should do global emoji at the start of the function so it can be accessed inside the function
4th Jun 2018, 7:13 PM
TurtleShell
TurtleShell - avatar
+ 1
TurtleShell, thank you!
4th Jun 2018, 7:14 PM
Snowflake C
Snowflake C - avatar