From 1c09a9697c9a068e36439529caffefd529a04642 Mon Sep 17 00:00:00 2001 From: "Jenisha Parekh (parekhj4)" Date: Tue, 15 Nov 2022 11:33:09 +0000 Subject: [PATCH] Add files via upload --- Chatbox4.py | 24 +++++++++++++++++ Chatboxsurvey3.py | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 Chatbox4.py create mode 100644 Chatboxsurvey3.py diff --git a/Chatbox4.py b/Chatbox4.py new file mode 100644 index 0000000..d216887 --- /dev/null +++ b/Chatbox4.py @@ -0,0 +1,24 @@ +#start code of by giving them an intro about the chat bot and what it provides +def intro(): + print("Hello, I am your personal, user- friendly therapy chat bot!") + print("I have the ability to provide you with advice on certain mental health issues such as stress, depression, anxiety and bullying,") + print("or I am more than delighted to be a listener if that helps you feel better and that's what you need") + print("Would you like to talk?") + answer=input() + ans = ["yes", "YES", "Yes"] + if answer in ans: + print ("Before starting the session I would like you to know that I will maintain confidentiality and ensure that all of the details that you may provide me with remain private, and at the end of the session all of your data will be cleared and not be used for other purposes.") + print("How may I help you today?") #ask a question to start of the conversation with the user + +intro() + + + + + + + + + + + diff --git a/Chatboxsurvey3.py b/Chatboxsurvey3.py new file mode 100644 index 0000000..4738095 --- /dev/null +++ b/Chatboxsurvey3.py @@ -0,0 +1,65 @@ +#This needs to be at the end when the user is finished with the chat bot +#survey to ask user about their experience and what they think we should do to improve if needed +#code needs to be added before this so it can flow in + +print("Before leaving, it would be very helpful for the team if you could take part in a short survey.") +print("This would help us improve our services if needed and will not take more than 5 minutes of your time") + +def survey(): + print("Would you like to take part in our survey?") + answer1=input() + answer1.upper() + ans0 = "yes" + if answer1 in ans0: + print("Please know that your answers will be kept personal and at the end of the survey you will be questioned if you want your answers to be used for company purposes to improve our services") # + if answer1 not in ans0: + print("We hope we have been helpful in the support provided, goodbye") + exit() + + print("Would you recommend this therapy chat bot to friends or family that may be in need to help or advice? " "Yes or no") + answer2 = input() #first question asked + answer2.lower() + ans2 = ["yes","yeah"] + if answer2 in ans2: + print("Thank you") + elif answer2 == "of course": + print("We are happy to help to all!") + else: + print("We are sorry for any problems caused on our behalf, please let us know if we could do anything different for future users.") + + print("How would you rate your overall experience with the chat bot today? " "Choose a number between 1-5 with 1 being very unsatisfied and 5 being very satisfied") #second question asked + answer1 = input() + if answer1 >= "4": + print("We are glad you think this way about our facility, thank you") + else: + print("Sorry if we have made any mistakes during the chat, please contact us via email and please provide infomation on how we are able to enhance our assistance.") + + print("As stated at the start of the survey you will be now asked a question on whether you would like your answers to be used for company purposes. " "If yes type :)") + answer3 = input() + ans3 = ":)" + if answer3 in ans3: + print("Thank you for taking part in the survey and for agreeing for your answers to be used for future purposes.") + else: + print("No worries! " "We respect your decision and privacy, it was good having you here, goodbye!") + +def endwhile(): #while loop added + n=4 + while n > 0: + n = n-1 + if n == 0: + break + print(n) + print("This session has now ended") + + + +survey() +endwhile() + +#end of survey + + + + + +