Please Subscribe My YouTube Channel

Tuesday, March 14, 2023

Quiz Program With Python Programming

Create a Quiz Program With Python:-


print("Welcome To ITCI")

print("\n")
score=0
user=input("Do you want play the quiz ?  ")
if (user=='y' or user=='Y'):#user can press y or Y
    print("\nLets play!!\n")
else:
    print("See you Next Time")#if user press No then this msg display
    exit()#and program will stop
Q1=input('Q1. What is the full form of C.P.U ?\nA. Centeral Process Unit.\nB. Central Processing Unit.\nYour Answer:-')
if(Q1=='b' or Q1=='B'):
    print("Correct\n")
    score+=1
else:
    print("you are wrong\n")
Q2=input("Q1. What is the full form of A.L.U ?\nA. Airthmatic Logic Unit.\nB. Airclock Logic Unit.\nYour Answer:- ")
if(Q2=='a' or Q2=='A'):
    print("Correct\n")
    score+=1
else:
    print("you are wrong\n")
Q2=input("Q1. How many hours in a day ?\nA. 24 hours.\nB. 23 hours.\nYour Answer:- ")
if(Q2=='a' or Q2=='A'):
    print("Correct\n")
    score+=1
else:
    print("you are wrong\n")
q3=input("a for:-\nA.apple\nB.egg\nYour answer:- ")
if (q3=='a' or q3=='A'):
    print("correct")
    score+=1
else:
    print("wrong")
    
print("Your Score is",score,"out of 4.\nThanks!!")
exit()

No comments:

Post a Comment

*******Please Comment, Like and Share******
दोस्तों पूरी पोस्ट पढने के लिए धन्यवाद, आशा करता हूँ आप को यह पोस्ट पसंद आई होगी और भी अधिक जानकारी के लिए या मुझसे जुड़ने के लिए आप मुझे मेरे फेसबुक पेज information & technology computer institutions और इन्स्टाग्राम ID:- satyam_hardoi को फॉलो कर सकते है,
मेरा youtube चैनल itci computer hardoi सर्च करे और पाए कंप्यूटर से सम्बंधित सभी विडियो और हाँ प्लीज नई अपडेट पाने के लिए चैनल को सब्सक्राइब जरुर करें, धन्यवाद | आपका $ सत्यम सर् $