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.
24 odpowiedzi
+ 26
bill=int(input())
tip = bill*20/100
print(tip)
+ 4
The prompt you used is screwing up the automated test.
+ 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
+ 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
+ 2
Automated tests expect an exact answer and is not lenient about extra output.
+ 2
Try it
tip = bill*20/100
print(tip)
+ 1
Abhay It's Variables. MODULE PROJECT:Tip Calculator
+ 1
Simba Thanks. It worked!
+ 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
0
What is the code you have written for it?
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?
0
Oyintare Tugbokorowei looks right to me .
are you getting any error ?
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
0
Oyintare Tugbokorowei what module it is?
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
0
bill=int(input())
tip = bill*20/100
print(tip)
0
bill=int(input())
tip = bill*20/100
print(tip)
0
I meed a help
0
bill=int(input())
tip = bill*20/100
print(tip)
0
Yes broken