Exemplo n.º 1
0
 def setUp(self):
     """
     Create a survey and a set of responses for use in all test methods.
     """
     question = "What language did you first learn to speak?"
     self.my_survey = AnnonymousSurvey(question)
     self.responses = ['English, Spanish, Mandarin']
from survey import AnnonymousSurvey

# Define a question, and make a survey.
question = "What language did you first learn to speak?"
my_survey = AnnonymousSurvey(question)

# Show the question, and store responses to the question.
my_survey.show_question()
print("Enter 'q' at any time to quit.\n")
while True:
    response = input("Language: ")
    if response == 'q':
        break
    my_survey.store_response(response)

# Show the survey results.
print("\nThank you to everyone who participated in the survey!")
my_survey.show_results()
Exemplo n.º 3
0
    def setUp(self):
        """ CREATE A RESEARCH AND A LIST OF RESPONSES WICH COULD 
		USED BY IN ALL TESTS METHODS """
        question = "Waht language did you first learn to speak?"
        self.survey = AnnonymousSurvey(question)
        self.responses = ['English', 'PT', 'ES']
Exemplo n.º 4
0
 def setUp(self):
     # create a survey and a set of responses for use in all test methods.
     #this chapter will be reviewed.
     question = "What language did you first learn to speak? "
     self.my_survey = AnnonymousSurvey(question)
     self.responses = ['English', 'Spanish', 'Mandarin']
Exemplo n.º 5
0
 def setUp(self):
     self.question = "What language did you first learn to speak?"
     self.my_survey = AnnonymousSurvey(self.question)
     self.responses = ['C', 'Python', 'C++']