0

Python. Sololearn broken???

I worked out a code to solve the problem below and ran it on my computer. It worked Just Fine! However when I run the exact same code on Sololearn playground, it keeps saying WRONG! I hate that Sololearn keeps doing this and won't let me past this Module Quiz Project when I keep getting right but not according to them. What's the right program to solve this issue? HELP! Anyone? When you go out to eat, you always tip 20% of the bill amount. But who’s got the time to calculate the right tip amount every time? Not you that’s for sure! You’re making a program to calculate tips and save some time. Your program needs to take the bill amount as input and output the tip as a float. Sample Input: 50 Sample Output: 20.

4th Feb 2021, 10:02 AM
Oyintare Tugbokorowei
23 Antworten
+ 26
bill=int(input()) tip = bill*20/100 print(tip)
4th Feb 2021, 10:14 AM
Simba
Simba - avatar
+ 4
The prompt you used is screwing up the automated test.
5th Feb 2021, 10:10 PM
Sonic
Sonic - avatar
+ 4
Oyintare Tugbokorowei Your question: "So what's wrong"? Sololearn processes input a bit differently than external progams. Sololearn example: text = input("Enter a word: ) # test print(text) -> Enter a word: test External programs tend to just print "test", so your external testing looked good but was not processed as expected by Sololearn. I suggest running your code on the playground before submitting to the challenges, that way you can assess results against expectations
6th Feb 2021, 12:55 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
Bill = int(input()) Tip = Bill*0.2 Print(Tip) It's easy....u just need to multiply 20% = 0.2 U don't need any complicated programming for it
5th Feb 2021, 11:26 AM
Utkarsh
Utkarsh - avatar
+ 2
Automated tests expect an exact answer and is not lenient about extra output.
5th Feb 2021, 10:11 PM
Sonic
Sonic - avatar
+ 2
Try it tip = bill*20/100 print(tip)
30th Jan 2022, 8:33 PM
Avrian Shandy
Avrian Shandy - avatar
+ 1
Abhay It's Variables. MODULE PROJECT:Tip Calculator
4th Feb 2021, 10:16 AM
Oyintare Tugbokorowei
+ 1
Simba Thanks. It worked!
4th Feb 2021, 10:26 AM
Oyintare Tugbokorowei
+ 1
i think the questions are a bit hard we just search the answers from google or click view answers then what is the use of giving hours to the app while we cannot complete the projects thats it sorry i dont know the answers and also i m going to quit learning bye all
26th Dec 2021, 11:12 AM
Not Dr. Ujjwal
0
What is the code you have written for it?
4th Feb 2021, 10:03 AM
Abhay
Abhay - avatar
0
bill = input ("Enter bill amount: ") tip = int(bill) * 0.2 print (tip) That's the code I wrote to calculate a 20% tip of any bill I receive. It is wrong?
4th Feb 2021, 10:06 AM
Oyintare Tugbokorowei
0
Oyintare Tugbokorowei looks right to me . are you getting any error ?
4th Feb 2021, 10:08 AM
Abhay
Abhay - avatar
0
Thank you. So what's Sololearn's problem? No. I'm not getting any error. it just goes to the "Results" terminal and says I need to try again as I didn't give the expected input Anyone with other ideas?. I'd like to have this Module completed and not leave it incomplete
4th Feb 2021, 10:10 AM
Oyintare Tugbokorowei
0
Oyintare Tugbokorowei what module it is?
4th Feb 2021, 10:12 AM
Abhay
Abhay - avatar
0
this is kinda confussing with the advice saying To calculate 20% of a given amount, you can multiply the number by 20 and divide it by 100: 50*20/100 = 10.0 and you just need to multiply nothing else no need to divide
31st Jul 2021, 10:54 AM
okay nice
okay nice - avatar
0
bill=int(input()) tip = bill*20/100 print(tip)
16th Dec 2021, 7:58 AM
Marvin Manaog
Marvin Manaog - avatar
0
bill=int(input()) tip = bill*20/100 print(tip)
9th Jan 2022, 2:53 PM
Maryam Ahmed
Maryam Ahmed - avatar
0
I meed a help
14th Jan 2022, 4:15 PM
Ben Sanvee Sayway
0
bill=int(input()) tip = bill*20/100 print(tip)
1st Feb 2022, 5:00 AM
KESHAV KONDABALA
KESHAV KONDABALA - avatar
0
Yes broken
1st Feb 2022, 2:32 PM
Ben Sanvee Sayway