Write a program to illustrate all the arithmetic operations(python) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Write a program to illustrate all the arithmetic operations(python)

Please help me with this

3rd Aug 2021, 2:34 AM
Aditya Pradhan
Aditya Pradhan - avatar
5 Answers
+ 5
Calvin Thomas , the op has started just started 2 days ago with joining sololearn and beginning to learn python for beginners. i am sure that your code will run and we all appreciate your work and engagement, but i am also sure that the op will have problems to understand how the code is working. may be it can help him to get an idea what the code is doing, if a suitable explanation will be given. thanks for your understanding !
3rd Aug 2021, 8:14 PM
Lothar
Lothar - avatar
+ 3
It's nothing, but you have to show all arithmetic operations in python as an example! You have to show the work of + ,- , / , // , ** , * ,% these! Like, print(4 + 5)
3rd Aug 2021, 2:41 AM
Abhiyantā
Abhiyantā - avatar
0
Aditya Pradhan Here's a code that does the job: for x in ("+", "-", "/", "*", "%", "//", "**"): print(7, x, 3, "=", eval("7" + x + "3")) # Hope this helps
3rd Aug 2021, 5:36 AM
Calvin Thomas
Calvin Thomas - avatar
0
Lothar Uh, that's right I guess. I just post what seems obvious to me.
4th Aug 2021, 2:05 AM
Calvin Thomas
Calvin Thomas - avatar
4th Aug 2021, 12:09 PM
Aditya Pradhan
Aditya Pradhan - avatar