Skip to content

Commit

Permalink
Merge pull request #34 from Manan311/master
Browse files Browse the repository at this point in the history
Update in game instructions #31
  • Loading branch information
cherryWood55 authored Dec 2, 2019
2 parents 7cdb249 + 79de87d commit 7cc9cd9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Binary file added .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A simple quiz game built using Python
(b) Exit.

4. Pick your interest
(a) Science (b) History of India (c) Commerce (d)Technology (e)World GK
(1) Science (2) History of India (3) Commerce (4)Technology (5)World GK

You'll be presented with domain specific questions.

Expand Down Expand Up @@ -45,4 +45,5 @@ A simple quiz game built using Python
Kamuish
chanchalv18
dvfleet413
Manan311
```
6 changes: 3 additions & 3 deletions question.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def ask_one_question(question):
print("\n" + question)
choice = input("Enter Choice [a/b/c/d]: ")
choice = input("Enter Your Choice [a/b/c/d]: ")
while(True):
if choice.lower() in ['a', 'b', 'c', 'd']:
return choice
Expand All @@ -29,7 +29,7 @@ def score_one_result(key, meta):

def test(questions):
score = 0
print("General Instructions:\n1. Please enter only the choice number corresponding to the correct answer.\n2. Each question carries 2 points\n3. Wrong answer leads to -1 marks per question\nGood Luck!\n")
print("General Instructions:\n1. Please enter only the choice letter corresponding to the correct answer.\n2. Each question carries 2 points\n3. Wrong answer leads to -1 marks per question\nQuiz will start momentarily. Good Luck!\n")
time.sleep(10)
for key, meta in questions.items():
questions[key]["user_response"] = ask_one_question(meta["question"])
Expand All @@ -51,7 +51,7 @@ def load_question(filename):
def play_quiz():
flag = False
try:
choice = int(input("Welcome to Today's Quiz!\nChoose your domain of interest:\n(1). Science\n(2). History of India\n(3). Commerce\n(4). Technology\n(5). World Gk\n Enter your choice: "))
choice = int(input("Welcome to Today's Quiz!\nChoose your domain of interest:\n(1). Science\n(2). History of India\n(3). Commerce\n(4). Technology\n(5). World Gk\nEnter Your Choice [1/2/3/4/5]: "))
if choice > len(TOPICS_LIST) or choice < 1:
print("Invalid Choice. Enter Again")
flag = True # raising flag
Expand Down

0 comments on commit 7cc9cd9

Please sign in to comment.