Flash Card App using Python
Master Python with 70+ Hands-on Projects and Get Job-ready - Learn Python
Program 1
def flash_card_app():
flashcards ={
"What is the capital of India?": "Delhi",
"What is 10 + 10?": "20",
"Who wrote 'Harry Potter'?": "J.K. Rowling",
"Where is Taj Mahal ?": "Agra",
"Python is ............?": "Language",
"Which animal is known as the Ship of the Desert?": "Camel",
"How many days are there in a week?": "7",
"How many letters are there in the English alphabet?": "26",
"Rainbow consist of how many colours?": "7" ,
"What is 50-10? ": "40"
}
count=0
for question,answer in flashcards.items():
print(question)
myans=input("Your Answer is : ")
if(answer==myans):
count=count+1
print("Out of 10 your correct Answer is: ",count)
print("********** Correct Answer ****************")
for question,answer in flashcards.items():
print(question)
input("Press Enter to reveal the answer...")
print(answer)
#Main
flash_card_app()
Did we exceed your expectations?
If Yes, share your valuable feedback on Google

