+ 1

Can anyone debug this for exact solution for all scenarios?

https://www.sololearn.com/coach/44?ref=app The code is here: cost = 5 quantity = int(input()) total = quantity * cost discount = total * .10 act = total - discount tax = act * .07 if(quantity > 1): print(act + tax) else: print(cost + tax) https://sololearn.com/compiler-playground/c5ceeZJhbHAD/?ref=app

31st Mar 2024, 11:06 AM
Manish
5 odpowiedzi
+ 2
Manish , No. The Code Coach only shows me my solutions and only shows you your solutions. That's why you have to save it separately.
31st Mar 2024, 11:50 AM
Rain
Rain - avatar
+ 1
Rain you can slide and choose python may be my solution shows.
31st Mar 2024, 11:25 AM
Manish
+ 1
Manish , When you paste the code into a message, each person who wants to run it has to copy and paste it into the playground to run it. That's why it's better if you copy and paste it into the playground and save it once and share the link to save everyone the work.
31st Mar 2024, 12:20 PM
Rain
Rain - avatar
0
Manish , That link shows the directions for the Code Coach called Kaleidoscopes. That's good so we can read the directions, but we can't read your code. You'll have to copy and paste your code into a separate file and share that link too. Then we can read it.
31st Mar 2024, 11:22 AM
Rain
Rain - avatar
0
Manish , Please adopt the convention of four spaces per indentation level. You need to round the output to two decimal places like it says in the directions, since it's money.
31st Mar 2024, 12:25 PM
Rain
Rain - avatar