Created
December 13, 2024 19:09
-
-
Save prodevo/2c20e0c9d346c5ce0fd5593156286ec7 to your computer and use it in GitHub Desktop.
HW_Python_2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = int(input("°C: ")) | |
#b = int(input("друга сторона: ")) | |
c = a * 1.8 + 32 | |
print("℉: ", c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = int(input("число: ")) | |
b = int(input("відсоток: ")) | |
c = a / 100 * b | |
print("результат: ", c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) + "кг") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = int(input("гривні:")) | |
print("долари: ", round(r/42, 2)) | |
print("євро: ", round(r/44, 2)) | |
print("біткоїн: ", round(r/4164532, 2)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PI = 3.14 | |
r = int(input("радіус:")) | |
print("довжина цієї окружності: ", PI*r*2) | |
print("площа цієї окружності: ", PI*r**2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = int(input("перша сторона: ")) | |
b = int(input("друга сторона: ")) | |
c = a * b | |
print("результат: ", c, "см^2") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = float(input("перше число:")) | |
b = float(input("друге число:")) | |
c = float(input("третє число:")) | |
print("Середнє арифметичне: ", (a+b+c)/3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = int(input("число:")) | |
b = int(input("ступінь:")) | |
print("Середнє арифметичне: ", a**b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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