Skip to content

Instantly share code, notes, and snippets.

@prodevo
Created December 13, 2024 19:09
Show Gist options
  • Save prodevo/2c20e0c9d346c5ce0fd5593156286ec7 to your computer and use it in GitHub Desktop.
Save prodevo/2c20e0c9d346c5ce0fd5593156286ec7 to your computer and use it in GitHub Desktop.
HW_Python_2
a = int(input("°C: "))
#b = int(input("друга сторона: "))
c = a * 1.8 + 32
print("℉: ", c)
a = int(input("число: "))
b = int(input("відсоток: "))
c = a / 100 * b
print("результат: ", c)
a = 15
b = 10
c = a
a = b
b = c
print("з третьою змінною: ", a, b)
t = 25
n = 20
t = t + n
n = t - n
t = t - n
print("без третьої змінної: ", t, n)
a = int(input("кг: "))
b = int(input("фнт: "))
p = a / 0.4059
k = b * 0.4059
print(str(a) + "кг =", str(round(p, 2)) + "фнт")
print(str(b) + "фнт =", str(round(k, 2)) + "кг")
r = int(input("гривні:"))
print("долари: ", round(r/42, 2))
print("євро: ", round(r/44, 2))
print("біткоїн: ", round(r/4164532, 2))
PI = 3.14
r = int(input("радіус:"))
print("довжина цієї окружності: ", PI*r*2)
print("площа цієї окружності: ", PI*r**2)
a = int(input("перша сторона: "))
b = int(input("друга сторона: "))
c = a * b
print("результат: ", c, "см^2")
a = float(input("перше число:"))
b = float(input("друге число:"))
c = float(input("третє число:"))
print("Середнє арифметичне: ", (a+b+c)/3)
a = int(input("число:"))
b = int(input("ступінь:"))
print("Середнє арифметичне: ", a**b)
a = int(input("1: "))
b = int(input("2: "))
print("сума: ", a + b)
print("різниця: ", a - b)
print("добуток: ", a * b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment