diff --git a/1. Variáveis, entrada e saída.md b/Programação script/1. Variáveis, entrada e saída.md similarity index 94% rename from 1. Variáveis, entrada e saída.md rename to Programação script/1. Variáveis, entrada e saída.md index f94ec7c..74726b5 100644 --- a/1. Variáveis, entrada e saída.md +++ b/Programação script/1. Variáveis, entrada e saída.md @@ -24,7 +24,8 @@ soma = 1 + 2 # 3 multiplicacao = 3 * 7 # 21 divisao = 96 / 4 # 24.0 divisao_inteira = 45 // 2 # 22 (o decimal é ignorado, não arredondado) -resto_divisao = 23 % 10 # +resto_divisao = 23 % 10 # 3 +potência = 2**12 # 4096 ## Comparadores igualdade = 42 == 2 # False @@ -43,5 +44,5 @@ ou_exemplo = 1 > 2 or 10 > 7 # True, pois 10 > 7 = True ``` ## Print, Input e strings ```python - +print ``` diff --git a/Programação script/Programas/1. Fahrenheit para Celsius.md b/Programação script/Programas/1. Fahrenheit para Celsius.md new file mode 100644 index 0000000..db91ecd --- /dev/null +++ b/Programação script/Programas/1. Fahrenheit para Celsius.md @@ -0,0 +1,7 @@ +```python +# Programa para converter Fahrenheit para Celsius +F = float(input("Digite a temperatura em F: ")) +CELSIUS = (5*(F-32))/5 + +print(f"{F}°F = {CELSIUS:.2f}°C") # Exibe em 2 casas decimais +```