Skip to content

Create database.py #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions database.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
print("***********************************************************")
print("Python Program to show countries with respect to continents")
print("************************************************************")
print("\nHello Sir I'm a ChatBot..\n")
africa = ["Nigeria", "South Africa", "Sudan"]
asia = ["Pakistan", "India", "Sri Lanka", "Bangladesh"]
antarctica = ["Norway", "Chile", "Argentina", "Chilli"]
europe = ["Russia", "UK", "Germany", "France", "Italy"]
South_America = ["USA", "Canada", "Mexico", "Cuba"]
North_America = ["Brazil", "Colombia", "Uruguay", "Paraguay"]
australia = ["Australia", "Papua New Guinea", "New Zealand", "Fiji"]
# result = input("Greetings:\n")
# if "hello" in result or "hi" in result:
# print("Hello sir How may I help you...")
result = input("Please Enter Your Question:\n")
if "asia" in result or "Asia" in result:
print("Here are the countries that are in Asia:\n")
print(asia)
elif "africa" in result or "Africa" in result:
print("Here are the countries that are in Africa:\n")
print(africa)
elif "antarctica" in result or "Antarctica" in result:
print("There are zero countries in Antarctica. There are several territories like \n")
print(antarctica)
elif "europe" in result or "Europe" in result:
print("Here are the countries that are in europe")
print(europe)
elif "North America" in result or "north america" in result:
print("Here are the countries that are in North America")
print(North_America)
elif "South America" in result or "south america" in result:
print("Here are the countries that are in North America")
print(South_America)
elif "australia" in result or "Australia" in result:
print("Here are the countries that are in North America")
print(australia)
else:
print(
"Sorry! So far there is no results are presnet against your input data. I'm continuously improving my database")
print("Good Buy!")