您从用户那里得到的 2 个数字的乘积与 x、y、z 之和的差值 (Python)
The difference of the product of the 2 numbers you get from the user and the sum of x, y, z (Python)
x,y,z = 2,5,10
number1 = int(input(""))
number2 = int(input(""))
Multiplication of numbers = int(number1) * int(number2)
print("Multiplication of numbers: " + str(Multiplication of numbers))
x_y_z = int(x) + int(y) + int(z)
x_y_z_toplam_ = int(Multiplication of numbers) + int(x_y_z)
print(x_y_z_toplam_ )
farkı = int(x_y_z_toplam_ ) - int(x_y_z_toplam)
print(farkı)
这是经过清理和解释的版本:
x,y,z = 2,5,10
number1 = int(input("Enter number 1: ")) # input prompt message
number2 = int(input("Enter number 2: "))
multiplication_of_numbers = number1 * number2 # variable name cannot be with spaces, also no need to convert an already int type to an int
print("Multiplication of numbers: {}".format(multiplication_of_numbers))
x_y_z = x + y + z
x_y_z_toplam = multiplication_of_numbers + x_y_z
print(x_y_z_toplam)
farkı = x_y_z_toplam - x_y_z_toplam
print(farkı)
x,y,z = 2,5,10
number1 = int(input(""))
number2 = int(input(""))
Multiplication of numbers = int(number1) * int(number2)
print("Multiplication of numbers: " + str(Multiplication of numbers))
x_y_z = int(x) + int(y) + int(z)
x_y_z_toplam_ = int(Multiplication of numbers) + int(x_y_z)
print(x_y_z_toplam_ )
farkı = int(x_y_z_toplam_ ) - int(x_y_z_toplam)
print(farkı)
这是经过清理和解释的版本:
x,y,z = 2,5,10
number1 = int(input("Enter number 1: ")) # input prompt message
number2 = int(input("Enter number 2: "))
multiplication_of_numbers = number1 * number2 # variable name cannot be with spaces, also no need to convert an already int type to an int
print("Multiplication of numbers: {}".format(multiplication_of_numbers))
x_y_z = x + y + z
x_y_z_toplam = multiplication_of_numbers + x_y_z
print(x_y_z_toplam)
farkı = x_y_z_toplam - x_y_z_toplam
print(farkı)