45-20+(10?5)%5*3=25 what is the operator in the place of “?” mark? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

45-20+(10?5)%5*3=25 what is the operator in the place of “?” mark?

Could you please anyone tell me the answer of this question please

30th Apr 2023, 3:49 AM
Lakshmi
Lakshmi - avatar
5 Answers
+ 8
45-20 = 25, right? Subtracting 25 from both sides yields (10?5)%5 * 3 = 0 Now, a product of integers is zero if and only if one of the factors is zero, right? Thus, you are looking for an operation of 10 and 5 that yields a remainder of 0 if divided by 5. In other words, 10?5 must be divisible by 5.
30th Apr 2023, 3:57 AM
Ani Jona 🕊
Ani Jona 🕊 - avatar
+ 7
Lakshmi , > we can have a short python exercise to evaluate this. just modify '=' to '==' expression = '45 - 20 + (10 ? 5) % 5 * 3 == 25' for operator in '+-*/%': expression = expression.replace('?', operator) if eval(expression) == True: print(f'operator is: {operator}')
30th Apr 2023, 9:26 AM
Lothar
Lothar - avatar
+ 3
👍🙂
30th Apr 2023, 4:26 AM
Ani Jona 🕊
Ani Jona 🕊 - avatar
+ 2
I got output thank you, Done it
30th Apr 2023, 4:14 AM
Lakshmi
Lakshmi - avatar
+ 2
45-20+(10?5)%5*3=25 priority operators (),%,*,-,+ if equals so from left to right % and * equals priority - and + the same ..equals so first its will (10?5) next &5 next *3 next 45-20 next + soooooooooo so lets spit its b=(10?5)%5 c=3 45-20+b*c=25 45-20+?*3=25 its mean (10?5)%5=0 cause 0*3=0 45-20+0*3=25 45-20+0=25 45-20=25 (10+5)%5=0 (10-5)%5=0 (10*5)%5=0 (10/5)%5=2 (10%5)%5=0 answer ? = +,-,*,% and it's ? = 0,1,2,3,4,5,6,7,8,9,&, ^ also.. cause (1005)%5=0 and etc.. (10&5)%5=0 (10^5)%5=0 Now everyone can understand that happens to
30th Apr 2023, 8:35 AM
Smith Welder
Smith Welder - avatar