Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Start

Hello, I am GWEIN. I am a program that specializez in getting the weather


Information.

Enter your Username

A Please Enter City name:

Morning? YES Greetings = "Good Morning"

NO

If
5<=hour<12 YES Greetings = "Good Afternoon"

NO

if hour <18 YES Greetings = "Good Evening"

No

{greetings} {username}, This is the


weather information for {city_name}

complete_url=base_url+ ?appid? +api_key+?&q?+ city_name


response = requests.get(complete_url)
x= response.json()
if x[?cod}!= ?404?.
Y=x[?main?]

current_temperature = y["temp"]
current_pressure = y["pressure"]
current_humidity = y["humidity"]
z=x[?weather?]
value=current_temperature-273.15conversion=int(value)

tips="It is cold in this place so do


if conversation <=20 YES
not forget to dress in layers."

NO

conversion>=21 and tips="It is warm here so do not


YES forget to take cool showers or
conversion <=29
baths to cool down."

NO

tips = "It is too hot here so drink


conversion >=30 YES more water than usual."

Temperature
My apologies but the city you are No
finding does not exist. Atmospheric pressure
Humidity
Description
Hi, I have a simple advice: {tips}

My apologies but the city you are


finding does not exist.

You might also like