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
'''main program'''
def main2():
greeting=["hi","hello","greetings","greet","greeting"]
user=input("Hello, how can I help you? ")
if user.lower() in greeting:
print("I am Chatter, your personal social companion. :) ")
else:
print("Sorry, what do you want?")
while True:
try:
print("Service list: \n(a)\tWeather \n(b)\tMusic \n(c)\tSocial")
user=input("Enter your service needed (please type letters): ")
except ValueError:
print("Invalid input!")
else:
if user.isalpha()==False:
print("Invalid input!")
continue
if user.lower() in ["a","b","c"]:
if (user.lower()).strip() == "a":
import weather_realtime
elif (user.lower()).strip() == "b":
import web
elif (user.lower()).strip() == "c":
from chat2 import greet
greet()
else:
from parrot import MainParrot
user=input("Are you sure to quit?(yes) ")
if user.lower() in ["yes"]:
break
else:
continue
print("Goodbye man!")
'''main program ends'''