0

Num = 3 if num == 7: print ("3");

It is correct or wrong pls explain

28th Apr 2019, 5:12 AM
Yogesh
Yogesh - avatar
4 odpowiedzi
0
What is the language? It seems that this is a mix of pascal (case insensitive variables), python (blocks starting with :) and C like languages (using ;)
28th Apr 2019, 5:25 AM
Seniru
Seniru - avatar
28th Apr 2019, 5:27 AM
Yogesh
Yogesh - avatar
0
Then the logic is right. But there are problems with the syntax. 1. You need to indent your code properly. 2.Python not case sensitive, so use Num or num (according to coding conventions it is recommended to use num for variables) 3.No semicolons for properly indented codes. But if you placed more than 1 statement in 1 line then you are welcome to use them
28th Apr 2019, 5:37 AM
Seniru
Seniru - avatar
0
Thankyou for ur explanation
28th Apr 2019, 5:41 AM
Yogesh
Yogesh - avatar