0

How is if-else from c is different from if-else in python?

25th Jan 2022, 6:06 AM
Kushagra Patel
2 Answers
+ 5
Just keep syntaxes clear in your mind. Logic is same in both langs. Only a thing you have to keep in mind of using proper indentation in python while in c , it's {} braces. Demo.... C if( age > 18 ) { printf("Adult"); }else if(.......){ //code here }else { //code here } Python if (age > 18): # para not compulsory print("Adult") elif (........ ): #code here else: #code here
25th Jan 2022, 6:14 AM
saurabh
saurabh - avatar
+ 4
Syntax only different.
25th Jan 2022, 6:10 AM
AzhagesanăƒŸ(✿)
AzhagesanăƒŸ(✿) - avatar