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
_____ regulate current/voltage flow, similar function as _____,but are smaller, cheaper, and more reliable.
Tpy6a [65]

Direct Current Power regulates current/voltage flow, similar function as unregulated or regulated, but is smaller, cheaper, and more reliable.

<h3>What is Direct Current Power?</h3>
  • In contrast to the flow of a river, direct current is a technique in which electricity constantly flows in the same direction. It speaks about the flow of electricity produced by batteries, solar cells, and other sources.
  • Alternating current (AC), on the other hand, is a technique in which the positive and negative sides are consistently swapped at regular intervals, changing the direction of the electricity flow in accordance.
  • This is the electricity that comes from a generator or a plug-in.
  • Alternating current is used to transmit both the electricity generated at power plants and the electricity delivered to houses.

To learn more about Direct Current Power, refer:

brainly.com/question/1402412

#SPJ4

8 0
2 years ago
Write a Python function to determine the volume of material remaining after the hole is drilled. The function should take as inp
Andru [333]

Answer:

height = int(input ("Enter height : ") )

print (height)

width = int( input("Enter length : ") )

print (width)

half_width =width/2

half_height=height/2

while 0==0:

   radius = float( input("Enter radius : ") )

   print (radius)

   

   if radius<half_width and radius <half_height:

       break

def remainingVolume(height,width,radius):

       

   vol_box=height*width*width

   print (vol_box)

   vol_hole=3.14178*radius*radius*height

   print (vol_hole)

   

   remaining_vol=vol_box-vol_hole

   print ("Remaining volume is ",remaining_vol)

   

remainingVolume(height,width,radius);

Explanation:

Take input from user for height ,width and radius. To find volume of box formula is vol=height* width*length\\

Let's assume width and length is same so

length= width

Using this formula of box volume find box volume.Now find volume of hole.

Consider hole as small cylinder, find volume of cylinder and subtract from volume of box to get remaining volume of box after hole.

vol_of_cyl=\pi radius^{2} height

5 0
2 years ago
Jhon bought a new printer for his desktop computer. It does not work even though he checked all the cables and cords. What do yo
Roman55 [17]
I think it’s d sorry if it ain’t ..
4 0
2 years ago
Which data type is used to teach a Machine Learning (ML) algorithm during structured learning?
vodka [1.7K]

Which data type is used to teach a Machine Learning (ML) algorithm during structured learning?

answer:

5 0
2 years ago
How will you apply the different wiring devices according to its main purposes and functions?
Gekata [30.6K]

Answer:Wiring devices are current-carrying electrical or electronic products that serve primarily as a connection or control point for electrical circuits within a range of 0–400 amperes, 0–600 volts (AC and DC), and AC/DC (660 watts, 1,000 volts AC fluorescent) as well as certain non-current-carrying wiring devices and supplies.

Wiring devices include:

Convenience plugs and power outlets (plugs and receptacles)

Connector bodies and flanged outlets

Cover plates

General-use switches and dimmers

Lampholders (incandescent, fluorescent, cold cathode, neon, quartz lamps, and others)

Lighting control devices

Motion sensing and timer switches

Receptacles

Switch, outlet, FM/TV, blank, and telephone plates

Undercarpet premise wiring systems

Products include receptacle-type arc-fault circuit interrupters (AFCIs), protection devices that can detect an unintended electrical arc and disconnect the power before the arc starts a fire. AFCI technology in residential and commercial buildings is an important electrical safety device.

8 0
3 years ago
Other questions:
  • True or false
    7·1 answer
  • An HP PC does not support the HP System Board Configuration tool, and you must use the HP System Board Replacement and System Di
    7·1 answer
  • You want to display the process of raising a scholarship request and its approval on a slide. Which element in the presentation
    5·1 answer
  • A technician is configuring a new SOHO multifunction wireless router at a customer's location to provide network access to sever
    7·1 answer
  • Which statement is NOT true:
    9·1 answer
  • What: A challenging question on this module's material.
    14·1 answer
  • You must keep track of some data. Your options are: (1) A linked-list maintained in sorted order. (2) A linked-list of unsorted
    5·1 answer
  • ☢☢☢does anyone know how to do the TYNKER CANNON assignment ( lesson 2 intro to game design) I'll give BRANLIEST(¬‿¬)❤ dont answe
    11·2 answers
  • What is the two’s compliment of -95,-122,-111,-57
    9·1 answer
  • When viewing an e-book section of an assignment in launchpad, you can return to your main course page at any time by clicking th
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!