Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(x, y, z):
- if x >= y:
- if y >= z: # x y z
- return x**2 + y**2
- else: # x z y
- return x**2 + z**2
- else:
- if x >= z: # y x z
- return y**2 + x**2
- else: # y z x
- return y**2 + z**2
- x=int(input("請輸入您的第一個數字"))
- y=int(input("請輸入您的第二個數字"))
- z=int(input("請輸入您的第三個數字"))
- print("{}**2+{}**2=",f(x,y,z))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement