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
from nltk.chat.util import Chat, reflections
import requests
import urllib
def chatter():
print("Hi, I'm T.O.N.I and I want to help and chat with you ! ")
print('To start a conversation with me select an option from below list:')
print("please select any one among the following :")
x=input('1) USA \n2) UK\n''3)CANADA \n4) GERMANY')
if x=='1':
r= urllib.request.urlopen('https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH,LTC&tsyms=USD')
print('crypto currency value :')
print(r.read())
print('where BTC=bitcon\nETC=etherum\nLTC=litecoin')
c= urllib.request.urlopen(' http://data.fixer.io/api/latest?access_key=c62358eec2ca31c5762caa8de8235dfc&symbols=USD')
print("*Currency value in USA*")
print(c.read())
print('the currency value coverted based on euro')
w=urllib.request.urlopen("https://samples.openweathermap.org/data/2.5/weather?q=washington%20DC,uk&appid=b6907d289e10d714a6e88b30761fae22")
print("*weather in USA*")
print(w.read())
if x=='2':
r= urllib.request.urlopen('https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH,LTC&tsyms=GBP')
print('crypto currency value :')
print(r.read())
print('where BTC=bitcon\nETC=etherum\nLTC=litecoin')
c= urllib.request.urlopen(' http://data.fixer.io/api/latest?access_key=c62358eec2ca31c5762caa8de8235dfc&symbols=GBP')
print("*Currency value in UK*")
print(c.read())
print('the currency value coverted based on euro')
w=urllib.request.urlopen("https://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22")
print("*weather in LONDON*")
print(w.read())
print("1.West Yorkshire")
print("2.Coventry")
print("3.Cornwall")
print("4.London")
sel = input(" Please enter the corresponding number beside the Tourist destination: ")
if sel=='1':
print("You have selected West Yorkshire")
print("COLLECTING INFORMATION FROM API")
print("places to visit in West Yorkshire")
print("Peak District National Park")
print("National park in England")
print("Large year-round recreation area encompassing villages, museums, hiking trails & camping.")
print("Driving time from Covnetry: 1.5 hours")
print("Google Maps link:https://goo.gl/maps/MsUbA1qRyLvksFrz8")
print("Thank you")
if sel=='2':
print("you have selected Coventry")
print("Driving time from location: 5 minutes")
m=urllib.request.urlopen("https://api.mazemap.com/js/v1.3.2/mazemap.min.js")
print(m.read())
print("Coventry is a city in central England. It’s known for the medieval Coventry Cathedral, which was left in ruins after a WWII bombing. A 20th-century replacement, with abstract stained glass, stands beside it. The collection at the Herbert Art Gallery & Museum includes paintings of local heroine Lady Godiva. A statue of her, naked on horseback, is nearby. The 14th-century St. Mary’s Guildhall has a vaulted crypt.")
print("Places to visit in Coventry")
print("****Coventry Cathedral****")
print("The Cathedral Church of St Michael, commonly known as Coventry Cathedral, is the seat of the Bishop of Coventry and the Diocese of Coventry within the Church of England. The cathedral is located in Coventry, West Midlands, England. ")
print("****War Memorial Park, Coventry****")
print("The War Memorial Park is a large park of about 48.5 hectares in southern Coventry, England. The park was opened in July 1921 as a tribute to the 2,587 Coventrians who died between 1914 and 1918 fighting in the First World War.")
print("Driving time from Covnetry: 10 minutes")
print("Google Maps link:https://goo.gl/maps/RtwLuYly167")
print("Thank you")
if sel=='3':
print("you have selected Cornwall")
print("Driving time from location: 20 minutes")
m=urllib.request.urlopen("https://api.mazemap.com/js/v1.3.2/mazemap.min.js")
print(m.read())
print("Main Destination in Cornwall")
print("1.Porth beach, Newquay, Cornwall.\n2.Lost Gardens of Heligan.\n3.Penzance, Cornwall.")
print("Driving time from Covnetry: 25 minutes")
print("Google Maps link:https://goo.gl/maps/RtwLuYly167")
print("Thank you")
if sel=='4':
print("you have selected London")
print("Driving time from location: 120 minutes")
m=urllib.request.urlopen("https://api.mazemap.com/js/v1.3.2/mazemap.min.js")
print(m.read())
print("Main Destination in London")
print(" 1.Buckingham Palace and the Changing of the Guard.\n 2 The Tower of London and Tower Bridge.\n3 The British Museum. \n4 Big Ben and Parliament.")
print("Driving time from Covnetry: 125 minutes")
print("Google Maps link:https://goo.gl/maps/RtwLuYly167")
print("Thank you")
if x=='3':
r= urllib.request.urlopen('https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH,LTC&tsyms=GBP')
print('crypto currency value :')
print(r.read())
print('where BTC=bitcon\nETC=etherum\nLTC=litecoin')
c= urllib.request.urlopen(' http://data.fixer.io/api/latest?access_key=c62358eec2ca31c5762caa8de8235dfc&symbols=GBP')
print("*Currency value in Canada*")
print(c.read())
print('the currency value coverted based on euro')
w=urllib.request.urlopen("https://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22")
print("*weather in Canada*")
print(w.read())
print("1.Vancouver")
print("2.Toronto")
print("3.Montreal")
if x=='4':
r= urllib.request.urlopen('https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH,LTC&tsyms=GBP')
print('crypto currency value :')
print(r.read())
print('where BTC=bitcon\nETC=etherum\nLTC=litecoin')
c= urllib.request.urlopen(' http://data.fixer.io/api/latest?access_key=c62358eec2ca31c5762caa8de8235dfc&symbols=GBP')
print("*Currency value in Germany*")
print(c.read())
print('the currency value coverted based on euro')
w=urllib.request.urlopen("https://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22")
print("*weather in Germany*")
print(w.read())
print("1.Berlin's Brandenburg Gate.\n2.Cologne Cathedral (Kölner Dom)\n3.The Black Forest")
ma= input("Do you want to continue:(Y/N)")
if ma =='Y':
print("please select any one among the following :")
x=input('1) USA \n2) UK\n''3)Canada\n 4) GERMANY')
if x=='1':
r= urllib.request.urlopen('https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH,LTC&tsyms=USD')
print('crypto currency value :')
print(r.read())
print('where BTC=bitcon\nETC=etherum\nLTC=litecoin')
c= urllib.request.urlopen(' http://data.fixer.io/api/latest?access_key=c62358eec2ca31c5762caa8de8235dfc&symbols=USD')
print("*Currency value in USA*")
print(c.read())
print('the currency value coverted based on euro')
w=urllib.request.urlopen("https://samples.openweathermap.org/data/2.5/weather?q=washington%20DC,uk&appid=b6907d289e10d714a6e88b30761fae22")
print("*weather in USA*")
print(w.read())
if x=='2':
r= urllib.request.urlopen('https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH,LTC&tsyms=GBP')
print('crypto currency value :')
print(r.read())
c= urllib.request.urlopen(' http://data.fixer.io/api/latest?access_key=c62358eec2ca31c5762caa8de8235dfc&symbols=GBP')
print("*Currency value in UK*")
print(c.read())
print('the currency value coverted based on euro')
w=urllib.request.urlopen("https://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22")
print("*weather in LONDON*")
print(w.read())
print("1.West Yorkshire")
print("2.Coventry")
print("3.Cornwall")
print("4.London")
sel = input(" Please enter the corresponding number beside the Tourist destination: ")
if sel=='1':
print("You have selected West Yorkshire")
print("COLLECTING INFORMATION FROM API")
print("places to visit in West Yorkshire")
print("Peak District National Park")
print("National park in England")
print("Large year-round recreation area encompassing villages, museums, hiking trails & camping.")
print("Driving time from Covnetry: 1.5 hours")
print("Google Maps link:https://goo.gl/maps/MsUbA1qRyLvksFrz8")
print("Thank you")
if sel=='2':
print("you have selected coventry")
print("Driving time from location: 5 minutes")
m=urllib.request.urlopen("https://api.mazemap.com/js/v1.3.2/mazemap.min.js")
print(m.read())
print("Coventry is a city in central England. It’s known for the medieval Coventry Cathedral, which was left in ruins after a WWII bombing. A 20th-century replacement, with abstract stained glass, stands beside it. The collection at the Herbert Art Gallery & Museum includes paintings of local heroine Lady Godiva. A statue of her, naked on horseback, is nearby. The 14th-century St. Mary’s Guildhall has a vaulted crypt.")
print("Places to visit in Coventry")
print("****Coventry Cathedral****")
print("The Cathedral Church of St Michael, commonly known as Coventry Cathedral, is the seat of the Bishop of Coventry and the Diocese of Coventry within the Church of England. The cathedral is located in Coventry, West Midlands, England. ")
print("****War Memorial Park, Coventry****")
print("The War Memorial Park is a large park of about 48.5 hectares in southern Coventry, England. The park was opened in July 1921 as a tribute to the 2,587 Coventrians who died between 1914 and 1918 fighting in the First World War.")
print("Driving time from Covnetry: 10 minutes")
print("Google Maps link:https://goo.gl/maps/RtwLuYly167")
print("Thank you")
if sel=='3':
print("you have selected Cornwall")
print("Driving time from location: 20 minutes")
m=urllib.request.urlopen("https://api.mazemap.com/js/v1.3.2/mazemap.min.js")
print(m.read())
print("Main Destination in Cornwall")
print("")
print("Driving time from Covnetry: 25 minutes")
print("Google Maps link:https://goo.gl/maps/RtwLuYly167")
print("Thank you")
if sel=='4':
print("you have selected London")
print("Driving time from location: 120 minutes")
m=urllib.request.urlopen("https://api.mazemap.com/js/v1.3.2/mazemap.min.js")
print(m.read())
print("Main Destination in London")
print(" 1.Buckingham Palace and the Changing of the Guard.\n 2 The Tower of London and Tower Bridge.\n3 The British Museum. \n4 Big Ben and Parliament.")
print("Driving time from Covnetry: 125 minutes")
print("Google Maps link:https://goo.gl/maps/RtwLuYly167")
print("Thank you")
if x=='3':
r= urllib.request.urlopen('https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH,LTC&tsyms=GBP')
print('crypto currency value :')
print(r.read())
print('where BTC=bitcon\nETC=etherum\nLTC=litecoin')
c= urllib.request.urlopen(' http://data.fixer.io/api/latest?access_key=c62358eec2ca31c5762caa8de8235dfc&symbols=GBP')
print("*Currency value in Canada*")
print(c.read())
print('the currency value coverted based on euro')
w=urllib.request.urlopen("https://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22")
print("*weather in Canada*")
print(w.read())
print("1.Vancouver")
print("2.Toronto")
print("3.Montreal")
if x=='4':
r= urllib.request.urlopen('https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH,LTC&tsyms=GBP')
print('crypto currency value :')
print(r.read())
print('where BTC=bitcon\nETC=etherum\nLTC=litecoin')
c= urllib.request.urlopen(' http://data.fixer.io/api/latest?access_key=c62358eec2ca31c5762caa8de8235dfc&symbols=GBP')
print("*Currency value in Germany*")
print(c.read())
print('the currency value coverted based on euro')
w=urllib.request.urlopen("https://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22")
print("*weather in Germany*")
print(w.read())
print("1.Berlin's Brandenburg Gate.\n2.Cologne Cathedral (Kölner Dom)\n3.The Black Forest")
elif ma=='N':
print("thank you")
exit(0)
chatter()