I need testers | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I need testers

Can somebody go through this code, and just find as many ways possible to get errors that JUST give the error message and put your inputs here? Basically, find as many ways to break this calculator as possible and tell me how you did it. https://code.sololearn.com/c6k4zutU14g4/?ref=app

22nd Feb 2018, 3:19 AM
Momo
Momo - avatar
5 Answers
+ 15
hi @Momo, you have only one error at line 31 and 32 in the condition if b == "%" you can not convert string to float. here you must put: print(a%c) instead of what you made. input must be on separated lines as below: for fist two cases "sqrt" and "tax" you must insert two value on separated lines: ex for sqrt: 4 sqrt output will be: 2.0 ex for tax: 4 tax output will be: 4.42 for the other cases *, +, -, %, / you must insert three values on separate lines: ex for *: 4 * 5 ouput will be: 20 and the same for others.
22nd Feb 2018, 12:50 PM
Mohammad Dakdouk
Mohammad Dakdouk - avatar
+ 15
for the separated lines: i mean to put 4 then press enter(↩ ) and put * theb press enter(↩ ) and put 5 for % i have tried and it does not work also it will not give the remainder as you put. ex: 4 % 3 as you do will output: 0.4 * 3 = 1.2 which is wrong because 4%3 = 1 and not 1.2
22nd Feb 2018, 1:04 PM
Mohammad Dakdouk
Mohammad Dakdouk - avatar
+ 3
value error (input a non number) syntax error (do = not == in the if statement)
22nd Feb 2018, 7:28 AM
Obbu
Obbu - avatar
+ 1
In reply to the above: What line is this error on?
22nd Feb 2018, 12:19 PM
Momo
Momo - avatar
+ 1
In reply to above: I don't understand. All inputs ARE on separated lines. As for the percentage finder, it works when converting strings to floats. Edit: Or at least it did.
22nd Feb 2018, 12:54 PM
Momo
Momo - avatar