Python code output? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Python code output?

here is the code: x = int(input()) def inputX(): y = x+2222*22 print(x*y/y/x%x%y%y%x%y) inputX() It's Making the input a int(integer) PYNOTE(I want it to be a integer input) OUTPUT(For any number): 1.0 I dont want it to output that is there a thing u would do WHAT I WANT TO DO: i want it to Module y again and then Module x + x + y*y/x/x

8th Oct 2018, 5:39 PM
Potato Hacker
Potato Hacker - avatar
1 Answer
+ 1
Please try to reduce the Complexity of your Calculation. Because x + x = 2x and y * y = y^2 and x / x = 1 I assume the following reduced Formula ist right? x + x + y * y / x / x = 2x + y^2
13th Oct 2018, 7:19 PM
Sebastian Keßler
Sebastian Keßler - avatar