Skip to content
Permalink
7a675a442d
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
62 lines (53 sloc) 2.33 KB
if __name__=__"main__"
Print_hi("chatbot)"
def isgreeting(userInput):)
"""Returns indicating if user input was greeting"""
greetings+("hello,Hey)")
for word in greeting
if word in userinput:
reture true
return false
def respond():
"""print a response to user greeting"""
responses =["hello,hey"]
out = randomchoice(responses)
print(out)
def user_intentions():
interest=["period","menstral pains","cramps","weakness"]
ask1=input(_"what brings you here?")
for name in interest:
if name is ask :
print("""a period is the part of the menstrual cycle when a woman
bleeds from her vagina for a few days.For most women
this happens every 28days or so,but it is common for
period to be more or less frequent than this,ranging
from day 21 to day 40 of their cycle.""")
def problem(): #This function will ask the user about their problem and will give solution
interest1=["mentral pains","cramps","headace","heavy bleeding"]
ask1=input("how can i help you today?")
for y in interest1:
if ask1 in y[0]:
print("""mentual pain is common and a normalpart of your mentual cycle.
most women get it at some point in their life.it is usually
felt as painful muscle cramps in the tummy which spreads to
the thighs.when that happens simply eat anything you can,drink
a glass of milk and take some pain killers after that.""")
elif ask1==y[1] or ask1==y[2]:
print("""heavy bleeding is loosing 80ml in each period,having periods that
that last long that 7 days and also loss so much blood.if this
happens the best thing to do is to take NSAIDs that will really help.""")
def medical_advide(): #Ask if user need more information or advice.
a=input("do you want some more information?")
b=["yes]"]
for x in b:
if x in a:
print("providing contact information")
else:
pass
def ending ():#last code
q=input("hope it was helpful")
q=="yes":
print("""glad to be of help today
thanks for stoping by.""")
else:
print("you have a good day.")