Skip to content

spam #147953

@testesamoel6-alt

Description

@testesamoel6-alt

Bug report

Bug description:

print("Escolha o tipo de conversão:")
print("1. Celsius para Fahrenheit")
print("2. Fahrenheit para Celsius")
print("3. Celsius para Kelvin")
print("4. Kelvin para Celsius")
print("5. Fahrenheit para Kelvin")
print("6. Kelvin para Fahrenheit")

escolha = input("Digite sua escolha (1 a 6): ")

if escolha == '1':
celsius = float(input("Digite a temperatura em Celsius: "))
fahrenheit = (celsius * 9/5) + 32
print(f"{celsius}°C é igual a {fahrenheit}°F")
elif escolha == '2':
fahrenheit = float(input("Digite a temperatura em Fahrenheit: "))
celsius = (fahrenheit - 32) * 5/9
print(f"{fahrenheit}°F é igual a {celsius}°C")
elif escolha == '3':
celsius = float(input("Digite a temperatura em Celsius: "))
kelvin = celsius + 273.15
print(f"{celsius}°C é igual a {kelvin}K")
elif escolha == '4':
kelvin = float(input("Digite a temperatura em Kelvin: "))
celsius = kelvin - 273.15
print(f"{kelvin}K é igual a {celsius}°C")
elif escolha == '5':
fahrenheit = float(input("Digite a temperatura em Fahrenheit: "))
kelvin = (fahrenheit - 32) * 5/9 + 273.15
print(f"{fahrenheit}°F é igual a {kelvin}K")
elif escolha == '6':
kelvin = float(input("Digite a temperatura em Kelvin: "))
fahrenheit = (kelvin - 273.15) * 9/5 + 32
print(f"{kelvin}K é igual a {fahrenheit}°F")
else:
print("Escolha inválida. Por favor, digite um número de 1 a 6.")

CPython versions tested on:

3.9

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions