After instruction "if" i write print('one') but python shows error?😕 HELP ME PLEASE | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

After instruction "if" i write print('one') but python shows error?😕 HELP ME PLEASE

Problem with "print"

21st Apr 2020, 2:41 PM
Adilet Usonov
Adilet Usonov - avatar
4 Answers
+ 3
Your question is not clear but here is my view. The print statement in Python returns a 'None' so "if none" will be false. Here is small example for you to understand. https://code.sololearn.com/c6mX4OGQfQUf/?ref=app
21st Apr 2020, 3:21 PM
Avinesh
Avinesh - avatar
+ 2
Can you show us the complete code?
21st Apr 2020, 2:49 PM
CeePlusPlus
CeePlusPlus - avatar
+ 1
The code is fine. I don't see any error. Maybe you accidentally missed something in the original code but, unbeknownst to you, fixed your error.
21st Apr 2020, 3:15 PM
CeePlusPlus
CeePlusPlus - avatar
0
Make sure it looks like if 1<2: print ("one") You will need an if condition that is true followed by a colon : And don't forget to indent the print statement below :)
21st Apr 2020, 3:04 PM
David Nierman
David Nierman - avatar