import requests
# source: https://www.youtube.com/watch?v=I-xm8wVqO1o&t=1s
city = input("Enter a city name: ")
ApiKey = "cdd3be7d71fbdc5752c8b5b004957de4"
website = f"https://api.openweathermap.org/data/2.5/weather?q={city}&appid={ApiKey}"
WeatherInfo = requests.get(website)
temperature = int(WeatherInfo.json()["main"]["temp"]-273.15)
print(f"Current temperature in {city} is {temperature} degrees Celsius.")