+ 1

Why this is error?

I don't understand why this is happening can anyone help me with this? ``` wallet = 1200 product_fund = 500 print ("your money was: ",wallet) print ("product fund:",product_fund) if wallet > product_fund: print ("your money now is: ",wallet-product_fund) elif wallet<product_fund: print ("!!ERROR:you don't have enough money in your wallet!!") else: print ("ERROR: you don't have money now") ```

20th Apr 2023, 5:13 PM
zain Shendy
10 Respuestas
+ 4
https://code.sololearn.com/c417oShlU5fZ/?ref=app Here is the fix Like I said in the comment before, you must indent the elif clause (put two spaces at the beginning in the line after elif clause)
20th Apr 2023, 5:33 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 6
What is the error you are getting? Save code and share link.. how you indended in code is important in python..!!
20th Apr 2023, 5:30 PM
Jayakrishna 🇮🇳
+ 5
Hello! You should share a link of a private code instead of adding it in the description, it is more readable and understandable
20th Apr 2023, 5:31 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 4
Look at elif clause. You must indent the line under it. So then it will work.
20th Apr 2023, 5:32 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
+ 4
Thank you so much 🙏🏽
20th Apr 2023, 5:34 PM
zain Shendy
+ 3
Your welcome… keep happy-coding! ;)
20th Apr 2023, 5:34 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
20th Apr 2023, 5:32 PM
zain Shendy
0
you forgot to indent the line of code under elif
21st Apr 2023, 6:58 AM
i keyboard smash a lot hahahahhwhaha
i keyboard smash a lot hahahahhwhaha - avatar
0
In the elif statement there expects an Inendation
21st Apr 2023, 7:34 PM
RAMETI SIVAMANI