How is if-else from c is different from if-else in python? | Sololearn: Learn to code for FREE!

0

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

1/25/2022 6:06:34 AM

Kushagra Patel

2 Answers

New Answer

+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

+4

Syntax only different.