Tinga
Binga
Winga
Linga
Chinga
['Tinga', 'Binga', 'Winga', 'Linga', 'Chinga']
["Tinga", "Binga", "Winga", "Linga", "Chinga"]
secretNumber = 15 # integer
print(secretNumber)
food = "Pizza" # string
print(food)
names = ["Nandan", "Arnav", "Torin", "Remy"] # list
print(names)
IamCool = True # boolean
print(IamCool)
##Bonus Problem:
names_2 = {
"Nandan": "TeamMate1",
"Arnav": "TeamMate2",
"Torin": "TeamMate3",
"Remy": "TeamMate4",
}
print(names_2)
15
Pizza
['Nandan', 'Arnav', 'Torin', 'Remy']
True
{'Nandan': 'TeamMate1', 'Arnav': 'TeamMate2', 'Torin': 'TeamMate3', 'Remy': 'TeamMate4'}
questions = ["What period do I have AP CSP?", "What was this lesson on?", "What type of variable is used for numbers?"]
answers = ["5", "Data Abstraction", "Integer"]
score = 0
question_index = 0
while question_index < len(questions):
print("Question", question_index + 1, ":", questions[question_index])
user_answer = input("Enter your answer: ")
if user_answer.lower() == answers[question_index].lower():
print("Correct!")
score += 1
else:
print("Incorrect.")
question_index += 1
print("Quiz complete! You scored", score, "out of", len(questions))