1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
madam [21]
3 years ago
13

6.1.5: weather codehs

Computers and Technology
1 answer:
irina [24]3 years ago
6 0

Answer:

6.1.5: weather codehs is a Python code or program platform to find the weather.

Explanation:

<u>Python Program to find the weather of any place</u>:

# Python program to find current  

# weather details of any city  

# using openweathermap api  

# import required modules  

import requests, json  

# Enter your API key here  

api_key = "Your_API_Key"

# base_url variable to store url  

base_url = "http://api.openweathermap.org/data/2.5/weather?"

# Give city name  

city_name = input("Enter city name : ")  

# complete_url variable to store  

# complete url address  

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

# get method of requests module  

# return response object  

response = requests.get(complete_url)  

# json method of response object  

# convert json format data into  

# python format data  

x = response.json()  

# Now x contains list of nested dictionaries  

# Check the value of "cod" key is equal to  

# "404", means city is found otherwise,  

# city is not found  

if x["cod"] != "404":  

# store the value of "main"  

# key in variable y  

y = x["main"]  

# store the value corresponding  

# to the "temp" key of y  

current_temperature = y["temp"]  

# store the value corresponding  

# to the "pressure" key of y  

current_pressure = y["pressure"]  

# store the value corresponding  

# to the "humidity" key of y  

current_humidiy = y["humidity"]  

# store the value of "weather"  

# key in variable z  

z = x["weather"]  

# store the value corresponding  

# to the "description" key at  

# the 0th index of z  

weather_description = z[0]["description"]  

# print following values  

print(" Temperature (in kelvin unit) = " +

    str(current_temperature) +

 "\n atmospheric pressure (in hPa unit) = " +

    str(current_pressure) +

 "\n humidity (in percentage) = " +

    str(current_humidiy) +

 "\n description = " +

    str(weather_description))  

else:  

print(" City Not Found ")

CodeHS is a comprehensive teaching platform for helping schools teach computer science. The strategic Code HS is to engage all understudies to seriously affect what's to come. They accept that in the 21st century, coding is an essential ability, much the same as perusing and composing. That is the reason it is stated: Perused, Compose, Code. This is finished by giving incredible educational plan, instruments, and assets to instructors, understudies, and schools to execute top notch software engineering programs. They have a conviction that everybody ought to find the opportunity to get the hang of coding, and that it's an expertise that gives boundless innovative chance to understudies. They have a mean to help make software engineering instruction fun and open, and accept everybody are needing both incredible apparatuses just as an extraordinary network to get this going. This is done through their help for instructors, understudies and schools, with the assistance their committed group and stunning guides.

You might be interested in
Sally needs to teach her class how to convert a decimal number to a binary number. What is the first step she should take to sta
Alborosie

<u>Answer:</u>

  • <em>A. divide the decimal number by the base value 2</em>
  • <em>C. note the remainder separately</em>
  • <em>D. divide by 2 until she gets 0 as the remainder</em>
  • <em>B. collect the digits in the reverse order</em>

<u>Explanation:</u>

When we want to convert decimal number to a binary number first we have divide the given number by 2. The next step is to note the reminder of the number in the side every division so that the reminder value is the binary value. Repeat this until an zero is encountered.

We have to collate all the remainders from last of first and then the collated number is the answer for the given problem.

<em>So the given option can be ordered as, </em>

  • <em>A</em>
  • <em>C</em>
  • <em>D</em>
  • <em>B</em>
6 0
4 years ago
What motivated Barbara MBANEFO to become an engineer?
luda_lava [24]

Answer:

to help her community and give hope to others

Explanation:

8 0
3 years ago
Read 2 more answers
Meaning of mesh topology​
Pachacha [2.7K]

The meaning of mesh topology​ is that it is a type of networking that is made up of the fact that all its nodes do work together to share data amongst each other.

<h3>What is meant by mesh topology?</h3>

Mesh topology is a kind of networking that is said to be where the full nodes do act in a form of a cooperation  so that they can be able to share or distribute data among themselves.

Note that this topology was said to be first seen or developed in about an approximate of about 30+ years ago and it is one that is often used in military applications and now it is seen to be used in home automation, smart HVAC control, and others.

Hence, The meaning of mesh topology​ is that it is a type of networking that is made up of the fact that all its nodes do work together to share data amongst each other.

Learn more about mesh topology​ from

brainly.com/question/14879489

#SPJ1

6 0
2 years ago
Types of lines in dressmaking
Shtirlitz [24]

Answer:

table of contents/ straight line/horizontal line/diagonal line/zigzag line/curved line(softly)  curved line(fully)  thin line

Explanation:

your welcome

5 0
4 years ago
Please tell fast plzzzzzz.​
lana [24]

Answer:

True

Explanation:

4 0
3 years ago
Other questions:
  • numbers that the user inputs. You must use JoptionPane to input the three numbers. A first method must be called and used to dev
    13·1 answer
  • Unit Test
    5·2 answers
  • Using the Adjust group, what can you control to affect an image? Check all that apply.
    15·2 answers
  • Which of these tasks can be accomplished when the drop-down menu of the Bullets icon is clicked?
    14·1 answer
  • Suppose that the code below is the body of some loop. Given variables x and y write some code that reads a value into the variab
    5·1 answer
  • How does color affect your mood?
    11·2 answers
  • You just bought a new hard drive for your computer to replace your primary hard drive. After backing your data up and, then, ins
    8·2 answers
  • Subjective Questions
    11·1 answer
  • What would be the greatest tool for emphasis? (video class)
    9·1 answer
  • Consider that a man is watching a picture of a Black Horse. He receives an external stimulus from input channel. Man gains some
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!