tuttelikz

grammar_check

Feb 25th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. #string_to_check = 'Correct Answer'
  2. #string_correct = 'Correct Answer'
  3.  
  4. #answer_status = string_correct == string_to_check
  5. #print(answer_status)
  6.  
  7.  
  8.  
  9. a_1 = 'a'
  10. a_2 = 'b'
  11. a_3 = 'c'
  12.  
  13. t_1 = 'b1'
  14. t_2 = 'b2'
  15. t_3 = 'b3'
  16.  
  17. correct_answers = []
  18.  
  19. print(t_1)
  20. u_1 = input('Task 1: \n')
  21. print(t_2)
  22. u_2 = input('Task 2: \n')
  23. print(t_3)
  24. u_3 = input('Task 3: \n')
  25.  
  26. st_1 = u_1 == a_1
  27. st_2 = u_2 == a_2
  28. st_3 = u_3 == a_3
  29.  
  30. correct_answers.append(st_1)
  31. correct_answers.append(st_2)
  32. correct_answers.append(st_3)
  33. #print(correct_answers)
  34. correct_counter = 0
  35.  
  36. for answers in correct_answers:
  37.     print(answers)
  38.     if answers == True:
  39.         correct_counter = correct_counter+1
  40. print("Your number of corrects:")
  41. print(correct_counter)
Advertisement
Add Comment
Please, Sign In to add comment