Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I need help for this “easy” python program

I just started to learn python a couple days ago, and I started to watch some youtube videos for it. But no matter how many times I watched, I still couldn’t understand why this abomination of code is not working?

House price is $1M
If you have good credit you pay 10% for the downpayment
If not 20%

Im very new so i still dont understand stuff please critize or advice me. Thank you very much

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I tried everything
If i type 100 like i did here, it’s supposed to print “you have bad credit” and “your downpayment is $200000”

Thank you guys for answering! now I can continue studying python!!

>Solution :

No matter what number you wrote in the input, the line 2 if score will be True because score has a value. So line 3, 4 and 5 fill be executed but not line 7 and 8

Line 3: Your comparison isn’t assigned to anything

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading