-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAWS_Quiz_open.py
27 lines (22 loc) · 1.06 KB
/
AWS_Quiz_open.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import random
questions = [
{"question": "What does S3 stand for?", "answer": "Simple Storage Service"},
{"question": "What is EC2?", "answer": "Elastic Compute Cloud"},
{"question": "What is the name of AWS's managed database service?", "answer": "RDS"},
{"question": "What is the name of AWS's serverless computing platform?", "answer": "Lambda"},
{"question": "What is the name of AWS's content delivery network?", "answer": "CloudFront"},
{"question": "What is the name of AWS's message queuing service?", "answer": "SQS"},
{"question": "What is the name of AWS's container service?", "answer": "ECS"},
{"question": "What is the name of AWS's Kubernetes service?", "answer": "EKS"}
]
random.shuffle(questions)
score = 0
for i, q in enumerate(questions):
print(f"Question {i+1}: {q['question']}")
answer = input("Your answer: ")
if answer.lower() == q['answer'].lower():
print("Correct!")
score += 1
else:
print(f"Incorrect. The correct answer is: {q['answer']}")
print(f"You scored {score}/{len(questions)}")