Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
# identify keys words such as names of citys it the UK
import WeatherAPI
from geotext import GeoText
#import botTesting
# countryName =input("Enter Country Name: ")
# WeatherAPI.Weather.countrycall(countryName)
# cityName = input("Enter city Name: ")
# WeatherAPI.Weather.callWeatherAPI(cityName)
# get Weather information
# Based on countryName and then cityName
# find which country Name the user is looking for
# Then find the City name within that country
# out put the results New York
def getWeatherInfomation(userInput):
if GeoText(userInput).countries: # you must type the countries full name don't use UK use United Kingdom
# check if city is valid based on the country
if GeoText(userInput).cities:
WeatherAPI.Weather.callWeatherAPI(userInput)
else:
print("Your City does not Exist...")
else:
print("Your Country does not Exist...")
userInput = input("Enter Country Name: ")
getWeatherInfomation(userInput)