Created
April 17, 2024 10:05
-
-
Save Mehedi-Ahmed/8ee50636d54b7e64575110bd2df31433 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| players = int(input("How many participants?\n>> ")) | |
| # Initialize empty lists to store names and scores | |
| names = [] | |
| scores = [] | |
| # Iterate over each player | |
| for i in range(players): | |
| print("Participant", i+1) | |
| name = input("Enter your name: ") | |
| names.append(name) # Add the name to the list | |
| scores.append(0) # Initialize the score to 0 | |
| # Question 1 | |
| print("Question No 1\nWhich sentence is grammatically correct?\nA) She don't like spicy food.\nB) He doesn't likes spicy food.\nC) They doesn't like spicy food.\nD) She doesn't like spicy food.") | |
| answer = input("Enter your answer for Question 1 (A, B, C, or D): ") | |
| if answer.upper() == 'D': | |
| scores[i] += 1 | |
| # Question 2 | |
| print("Question No 2\nChoose the correct form of the verb to complete the sentence:\n'She _____ to the store yesterday.'\nA) go\nB) goes\nC) went\nD) gone") | |
| answer = input("Enter your answer for Question 2 (A, B, C, or D): ") | |
| if answer.upper() == 'C': | |
| scores[i] += 1 | |
| # Question 3 | |
| print("Question No 3\nWhich sentence is punctuated correctly?\nA) The cat climbed up the tree, and then it jumped down.\nB) The cat climbed up the tree and then, it jumped down.\nC) The cat climbed up the tree and then it jumped down.\nD) The cat climbed up the tree and then, it jumped down.") | |
| answer = input("Enter your answer for Question 3 (A, B, C, or D): ") | |
| if answer.upper() == 'A': | |
| scores[i] += 1 | |
| # Question 4 | |
| print("Question No 4\nIdentify the noun in the sentence:\n'The big brown dog chased the squirrel up the tree.'\nA) big\nB) chased\nC) squirrel\nD) tree") | |
| answer = input("Enter your answer for Question 4 (A, B, C, or D): ") | |
| if answer.upper() == 'C': | |
| scores[i] += 1 | |
| # Question 5 | |
| print("Question No 5\nWhich sentence uses the correct possessive form?\nA) The dogs toys are in the basket.\nB) The dog's toys are in the basket.\nC) The dogs' toys are in the basket.\nD) The dogs toys' are in the basket.") | |
| answer = input("Enter your answer for Question 5 (A, B, C, or D): ") | |
| if answer.upper() == 'B': | |
| scores[i] += 1 | |
| # Display the scores for each player | |
| for i in range(players): | |
| print(names[i], "has scored", scores[i], "out of 5") | |
| # Display the correct answers | |
| print("\nCorrect Answers:") | |
| print("Question 1:", "D) She doesn't like spicy food.") | |
| print("Question 2:", "C) went") | |
| print("Question 3:", "A) The cat climbed up the tree, and then it jumped down.") | |
| print("Question 4:", "C) squirrel") | |
| print("Question 5:", "B) The dog's toys are in the basket.") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment