python 3.10.1
1. inp = int(input())
x2 = inp * inp
x4 = x2 * x2
x5 = x4 * inp
print(x5)
2. x = int(input())
x2 = x * x
print(f"{str(int(1 - 2*x + 3*x2 - 4 * x * x2))}")
3. import numpy as np
x1, y1 = list(map(int, input().split()))
x2, y2 = list(map(int, input().split()))
print(np.sqrt(np.sqrt(np.absolute(x2 - x1)) + np.sqrt(np.absolute(y2 - y1))))
# test input 1 = """0 0
#1 1""" output = 1.4142135623730951
# test input 1 = """-4 -1
#-4 -2""" output = 1.0
# test input 1 = """0 1
#2 0""" output = 1.5537739740300374
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
python 3.10.1
1. inp = int(input())
x2 = inp * inp
x4 = x2 * x2
x5 = x4 * inp
print(x5)
2. x = int(input())
x2 = x * x
print(f"{str(int(1 - 2*x + 3*x2 - 4 * x * x2))}")
3. import numpy as np
x1, y1 = list(map(int, input().split()))
x2, y2 = list(map(int, input().split()))
print(np.sqrt(np.sqrt(np.absolute(x2 - x1)) + np.sqrt(np.absolute(y2 - y1))))
# test input 1 = """0 0
#1 1""" output = 1.4142135623730951
# test input 1 = """-4 -1
#-4 -2""" output = 1.0
# test input 1 = """0 1
#2 0""" output = 1.5537739740300374