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
Is there anybody who knows eris quirk but me- i feel lonely rn ;-;
Nutka1998 [239]

Answer:i do Eri's Quirk allows her to rewind an individual's body to a previous state. She has shown the ability to rewind someone's body to a point before they existed, which she accidentally did to her father.

3 0
3 years ago
Read 2 more answers
Explain default dictionary in ms word processing​
kiruha [24]

Answer:

The default custom dictionary is the dictionary to which Microsoft Word adds words.

Explanation:

When you install Microsoft Word, a general-purpose dictionary is automatically installed. This dictionary, specific to the language version of your installation, is used by the spell-checker to flag words that may be incorrect.

4 0
2 years ago
#include using namespace std; double CelsiusToKelvin(double valueCelsius) { double valueKelvin; valueKelvin = valueCelsius + 273
otez555 [7]

Answer:

//Below are the function which the user needs to add on the place of the "Your solution goes here".

double KelvinToCelsius(double valueKelvin)

{

   double valueCelsius;

   valueCelsius = valueKelvin - 273.15;

   return valueCelsius;

}

Explanation:

Missing information : The above question is missing which states to define one function which name is "KelvinToCelsius" and which takes one argument and changes the kelvin value into Celsius value. One header file syntax is also missing on the above question.

  • The above question wants to add a function to the place of the "Your solution goes here" and the work of the function is defined on the question.
  • So the above-defined function is used to return the value of Celsius if the user passes the value of kelvin.
  • The above-question also holds one function which takes the value of kelvin and returned Celsius, which returns value "283.15".
  • So if a user passes "283.15 for the kelvin value, then he got 10 which is defined as Celsius value on the question".
3 0
3 years ago
A ________ record is a resource record that allows other servers to deliver Internet mail using SMTP.
Novay_Z [31]

The resource record that allows other servers to deliver Internet mail using SMTP is called; Mail Exchanger (MX)

<h3>Use of Mail Exchanger </h3>

The correct answer to the blank part of the question is "Mail Exchanger(MX)". This is because a mail exchanger record is simply an MX record that identifies the mail server that has the responsibility of accepting email messages on behalf of a domain name.

Now this Mail Exchanger also operates by allowing other servers to deliver Internet mail with the aid of SMTP(Simple mail transfer protocol)

Read more about SMTP at; brainly.com/question/14568877

4 0
2 years ago
Capgemini was placed as LEADERS in Everest Intelligent Automation in Business Processes (IABP) Peak matrix 2020 report. Which am
skad [1K]

There are  lot of new innovation in Intelligent automation. The options that were among these were also placed as leaders are cognizant, Accenture, Wipro.

  • The 'Leaders' in Everest Group's PEAK Matrix assessments are simply known to be firms that has shown great and unique innovation and transition management in their work while improving technological strength via proprietary solutions, partnerships, etc.

Intelligent automation (IA) is simply known to be the integration of robotics with other different parts from multiple growing technologies.

Conclusively, Leaders are selected based on firms that has building technologies capabilities, robust client training program etc.

Learn more  Intelligent Automation about:

brainly.com/question/25757825

6 0
2 years ago
Other questions:
  • Processing is handled by the computer’s central processing unit (cpu).​ <br> a. True <br> b. False
    6·1 answer
  • Do you agree that digital signatures are the best way to protect the data in question?
    13·1 answer
  • Write the program to solve quadratic equations, but if the discriminant is negative, output
    9·1 answer
  • A restaurant has a case type that allows customer to book the dining room for events. Customers provide basic information includ
    7·1 answer
  • How do airbags prevent injury?
    13·1 answer
  • Which search strategy is most similar to greedy search?
    9·1 answer
  • When browsing using certain browsers, if a page is known to be malicious or using phishing techniques in the past a browser may
    5·1 answer
  • Whats the difference between Input and Output? Give and example of an example on a M:B​
    15·1 answer
  • Which of the following lines of code correctly defines a function called combine? OA define "combine(a, b, c)" as: B. define(com
    9·1 answer
  • Determine the value of a and b at the end of the following code segment:
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!