This is another quiz, with similar information and more links at the end. It was created to educate others of the process that goes into using code.
This is the code written in Python that created the quiz above, feel free to copy and paste. Explore different ways changing words will affect the final code.
print("Hello! Thanks for visiting our website.")
print("I am a quiz that you can take if you are looking for guidance.")
print("I think dogs are way,way,way "\
+"way,way,way,way,better than cats ")
answer = input("What about you? Please answer dogs or cats.")
print("You said you like " +answer+ ".")
print (""+answer+ " are very cool" )
print("I am here to help you with whatever help you may need.")
print("Tell me about it.")
###########################################################################
# SET (a TO ZERO
# SET (b TO ZERO
# SET (c TO ZERO
###########################################################################
scores=[0,0,0]
print("Why are you on this website?")
print("(a A friend told me")
print("(b I was browsing the web")
print("(c I want to help out a friend")
Q1 = input("So why are you here, please answer with the letter that most decribes you.")
if Q1 == "a":
scores[0]=scores[0]+1
print (scores)
elif Q1 == "b":
scores[1]=scores[1]+1
print (scores)
elif Q1 == "c":
scores[2]=scores[2]+1
print (scores)
else:
print("Sorry, that wasn't an option, please answer with a, b, or c.")
print (scores)
print("Have you been feeling any of the following lately?")
print("(a Stressed")
print("(b Moody")
print("(c Happy/Regular")
Q2 = input("Even if none describes you, anwser with the closest possible choice.")
if Q2 == "a":
scores[0]=scores[0]+1
print (scores)
elif Q2 == "b":
scores[1]=scores[1]+1
print (scores)
elif Q2 == "c":
scores[2]=scores[2]+1
print (scores)
else:
print("Sorry, that wasn't an option, please answer with a, b, or c.")
print (scores)
print("What has your behavior in class been like lately?")
print("a) Sitting away from my peers and trying to minimize my interactions with others.")
print("b) Feeling mad at myself and questioning everything that people say. ")
print("c) Regular, I've been pretty attentive, maybe chatting a little.")
Q3 = input("You may not feel any of these things, but please choose at least one.")
if Q3 == "a":
scores[0]=scores[0]+1
print (scores)
elif Q3 == "b":
scores[1]=scores[1]+1
print (scores)
elif Q3 == "c":
scores[2]=scores[2]+1
print (scores)
else:
print("Sorry, that wasn't an option, please answer with a, b, or c.")
print (scores)
print("Have you been enjoying class?")
print("a) I want to, but all the assignments make me feel stressed out.")
print("b) I really dislike class, I woluld rather stay home")
print("c) I don't love school, but it's pretty okay.")
Q4 = input("You don't have to relate to any of these, but be aware that we all go through these things.")
if Q4 == "a":
scores[0]=scores[0]+1
print (scores)
elif Q4 == "b":
scores[1]=scores[1]+1
print (scores)
elif Q4 == "c":
scores[2]=scores[2]+1
print (scores)
else:
print("Sorry, that wasn't an option, please answer with a, b, or c.")
print (scores)
print("What do you want to get from this site?")
print("a) I don't know.")
print("b) Some help.")
print("c) Information.")
Q5 = input("If you came to this website by chance. you should answer based on how you got here. ")
if Q5 == "a":
scores[0]=scores[0]+1
print (scores)
elif Q5 == "b":
scores[1]=scores[1]+1
print (scores)
elif Q5 == "c":
scores[2]=scores[2]+1
print (scores)
else:
print("Sorry, that wasn't an option, please answer with a, b, or c.")
print (scores)
print("Go through you answers and see which letter you got more of a,b,or c. You can also use the scores in brakets.")
print("If you got mostly a's copy and paste this URL into your browser:https://docs.google.com/document/d/1k4Pld1YrlqaMYMuWr0FfZWZ0C2sLkzibbspMx_YOm_c/edit")
print("If you got mostly b's copy and paste this URL into your browser:https://docs.google.com/document/d/1rYNQK1Zq0Oy_fylh5cj_VEII4osKUqwYBqyA3iv02rA/edit")
print("If you got mostly c's copy and paste this URL into your browser:https://docs.google.com/document/d/101qecFLBcr7rw8xm_SMFwJmWh8wVRDrD-E3C20Ez4xA/edit")
print("I am a quiz that you can take if you are looking for guidance.")
print("I think dogs are way,way,way "\
+"way,way,way,way,better than cats ")
answer = input("What about you? Please answer dogs or cats.")
print("You said you like " +answer+ ".")
print (""+answer+ " are very cool" )
print("I am here to help you with whatever help you may need.")
print("Tell me about it.")
###########################################################################
# SET (a TO ZERO
# SET (b TO ZERO
# SET (c TO ZERO
###########################################################################
scores=[0,0,0]
print("Why are you on this website?")
print("(a A friend told me")
print("(b I was browsing the web")
print("(c I want to help out a friend")
Q1 = input("So why are you here, please answer with the letter that most decribes you.")
if Q1 == "a":
scores[0]=scores[0]+1
print (scores)
elif Q1 == "b":
scores[1]=scores[1]+1
print (scores)
elif Q1 == "c":
scores[2]=scores[2]+1
print (scores)
else:
print("Sorry, that wasn't an option, please answer with a, b, or c.")
print (scores)
print("Have you been feeling any of the following lately?")
print("(a Stressed")
print("(b Moody")
print("(c Happy/Regular")
Q2 = input("Even if none describes you, anwser with the closest possible choice.")
if Q2 == "a":
scores[0]=scores[0]+1
print (scores)
elif Q2 == "b":
scores[1]=scores[1]+1
print (scores)
elif Q2 == "c":
scores[2]=scores[2]+1
print (scores)
else:
print("Sorry, that wasn't an option, please answer with a, b, or c.")
print (scores)
print("What has your behavior in class been like lately?")
print("a) Sitting away from my peers and trying to minimize my interactions with others.")
print("b) Feeling mad at myself and questioning everything that people say. ")
print("c) Regular, I've been pretty attentive, maybe chatting a little.")
Q3 = input("You may not feel any of these things, but please choose at least one.")
if Q3 == "a":
scores[0]=scores[0]+1
print (scores)
elif Q3 == "b":
scores[1]=scores[1]+1
print (scores)
elif Q3 == "c":
scores[2]=scores[2]+1
print (scores)
else:
print("Sorry, that wasn't an option, please answer with a, b, or c.")
print (scores)
print("Have you been enjoying class?")
print("a) I want to, but all the assignments make me feel stressed out.")
print("b) I really dislike class, I woluld rather stay home")
print("c) I don't love school, but it's pretty okay.")
Q4 = input("You don't have to relate to any of these, but be aware that we all go through these things.")
if Q4 == "a":
scores[0]=scores[0]+1
print (scores)
elif Q4 == "b":
scores[1]=scores[1]+1
print (scores)
elif Q4 == "c":
scores[2]=scores[2]+1
print (scores)
else:
print("Sorry, that wasn't an option, please answer with a, b, or c.")
print (scores)
print("What do you want to get from this site?")
print("a) I don't know.")
print("b) Some help.")
print("c) Information.")
Q5 = input("If you came to this website by chance. you should answer based on how you got here. ")
if Q5 == "a":
scores[0]=scores[0]+1
print (scores)
elif Q5 == "b":
scores[1]=scores[1]+1
print (scores)
elif Q5 == "c":
scores[2]=scores[2]+1
print (scores)
else:
print("Sorry, that wasn't an option, please answer with a, b, or c.")
print (scores)
print("Go through you answers and see which letter you got more of a,b,or c. You can also use the scores in brakets.")
print("If you got mostly a's copy and paste this URL into your browser:https://docs.google.com/document/d/1k4Pld1YrlqaMYMuWr0FfZWZ0C2sLkzibbspMx_YOm_c/edit")
print("If you got mostly b's copy and paste this URL into your browser:https://docs.google.com/document/d/1rYNQK1Zq0Oy_fylh5cj_VEII4osKUqwYBqyA3iv02rA/edit")
print("If you got mostly c's copy and paste this URL into your browser:https://docs.google.com/document/d/101qecFLBcr7rw8xm_SMFwJmWh8wVRDrD-E3C20Ez4xA/edit")