Project Testing Area
This is the testing site for the scrum project.
print("Username: ")
x = input()
print(x)
print("Password: ")
y = input()
print(y)
import requests
url = "https://open-weather13.p.rapidapi.com/city/San%20Diego"
headers = {
"X-RapidAPI-Key": "hi",
"X-RapidAPI-Host": "hi"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
# result = response.json().get('weather')
# for re in result:
# if re["main"] == "Clouds":
# for key, value in re.items():
# print(key, value)
# result = response.json().get('weather')
# for key, value in result.items():
# print(key, ":", value)
# result = response.json().get('weather')
# for re in result:
# re = ["weather"]
# for key, value in re.items():
# print(key, value)
print("Temperature in San Diego:")
result2 = response.json().get('main')
for key, value in result2.items():
print(key, ":", value)
# result = response.json().get('cities')
# for re in result:
# if re["city_name"] == "San Diego":
# for key, value in re.items():
# print(key, value)
import datetime
date = 1
dateCalc = datetime.datetime.now()
# print(dateCalc.strftime("%A"))
if dateCalc.strftime("%A") == "Monday":
date = "Mon"
if dateCalc.strftime("%A") == "Tuesday":
date = "Tue"
if dateCalc.strftime("%A") == "Wednesday":
date = "Wed"
if dateCalc.strftime("%A") == "Thursday":
date = "Thu"
if dateCalc.strftime("%A") == "Friday":
date = "Fri"
if dateCalc.strftime("%A") == "Saturday":
date = "Sat"
if dateCalc.strftime("%A") == "Sunday":
date = "Sun"
import requests
url = "https://yahoo-weather5.p.rapidapi.com/weather"
location = input()
querystring = {"location": str(location),"format":"json","u":"f"}
headers = {
"X-RapidAPI-Key": "hi",
"X-RapidAPI-Host": "hi"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
print("Weather is in ◦F")
print("Forcast in", str(location), ":")
result = response.json().get('forecasts')
for re in result:
if re["day"] == date:
# if re[""] change this later
for key, value in re.items():
print(key,":", value)
# print(re["day"], ":" " Low:", re["low"], "High:", re["high"], "Clearness:", re["text"])
# for key, value in re.items():
# print(key, ":", value)
import datetime
date2 = datetime.datetime.now()
print(date2.strftime("%A"))
print(date2)
date = 1
dateCalc = datetime.datetime.now()
print(dateCalc.strftime("%A"))
if dateCalc.strftime("%A") == "Tuesday":
date = 2
print(date)