Can someone help me again here? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can someone help me again here?

My already runs but the problem is once I put my choice, It prints 'Invalid Option!' which is supposed to print only when I enter a wrong choice. It doesn't say that I have a syntax error so I don't know what's wrong with the code. We have to pass this tomorrow so please help me. Here's the code: https://code.sololearn.com/c9MB76ej7m06/?ref=app

27th Oct 2022, 7:33 AM
Elljay
Elljay - avatar
3 Answers
+ 4
Indentation mistake. Line 23,24 are should be inside except block. And it saying amount is undefined. May be because you are creating Amount ( capital A) also defining Liters but using liters. use f{'amount: .2f} instead of b'{amount:b}. last 2 elif, you forgot to change option values to 3,4
27th Oct 2022, 7:47 AM
Jayakrishna 🇮🇳
+ 2
Elljay If further help is required please notify: https://code.sololearn.com/c79M043khtv2/?ref=app
27th Oct 2022, 2:29 PM
I am offline
I am offline - avatar
0
Thank you everyone for helping me.
27th Oct 2022, 3:31 PM
Elljay
Elljay - avatar