from pprint import pprint
import json

with open("pogoda.json", "r") as file:
    data = json.load(file)

city = input("Podaj nazwE miasta: ")

city_weather = None
for item in data['city_weather']:
    if item['city'] == city:
        city_weather = item
        break

if city_weather:
    print(f"\nPogoda w {city_weather['city']}:")
    print(f"Temperatura: {city_weather['temperature']}C")
    print(f"Wilgotność: {city_weather['humidity']}%")
    print(f"Stan pogody:  {city_weather['weather']}")
    print(f"Prędkość wiatru {city_weather['wind_speed']}km/h")
    print(f"Opis: {city_weather['description']}")
else:
    print("Nie znaleziono informacji o pogodzie w tym mieśćie.")