Why am I getting none in the output | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

Why am I getting none in the output

Only started learning 3 days ago, can anyone explain why I get the word 'none' in the output if I were to use an equal number? also anyway to prevent the none from appearing in the output? https://code.sololearn.com/cs64Yyrlwhmh/?ref=app

2nd Jun 2019, 3:57 PM
Steven Sim
Steven Sim - avatar
2 Réponses
+ 2
Hi, you are getting none because you wrote: if a==b: print("same") You should have instead returned the statement as you did in the first two lines so write this: if a==b: return "same"
2nd Jun 2019, 4:16 PM
Mo Hani
Mo Hani - avatar
0
Mo Hani Thank you very much!
2nd Jun 2019, 4:16 PM
Steven Sim
Steven Sim - avatar