+ 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
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.
+ 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
+ 3
value error (input a non number)
syntax error (do = not == in the if statement)
+ 1
In reply to the above:
What line is this error on?
+ 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.