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()

How to Draw Square with Python.

How to Draw Square with Python :-

import turtle #first we import turtle lib
tur=turtle.Turtle() #create a storage to store turtle lib
tur.color("red")
tur.pensize(5)
tur.hideturtle() #turtle will be hide when square is drawing
'''now we create a square you can use fd or forward to move
the turtle to forward side and rt or right
for move turtle to right side.'''
tur.fd(200)
tur.rt(90)
tur.fd(200)
tur.rt(90)
tur.fd(200)
tur.rt(90)
tur.fd(200)
tur.rt(90)
turtle.done() #tell to compiler that program is done

#note: - Using for loop

import turtle #first we import turtle lib
tur=turtle.Turtle() #create a storage to store turtle lib
tur.color("red")
tur.pensize(5)
tur.hideturtle() #turtle will be hide when square is drawing
'''now we create a square you can use fd or forward to move
the turtle to forward side and rt or right
for move turtle to right side.'''
for i in range(4):
    tur.fd(200)
    tur.rt(90)
turtle.done() #tell to compiler that program is done


How To Make Vote Age Calculator with Python

How To Make Vote Age Calculator with Python


print("Hi!\nWelcome To Voting Pannel")
age=int(input("Enter your age:- "))
if age >=18:
    print("you Are Eligible For Vote")
else:
    print("you Are Not Eligible For Vote")



Watch full video about this blog.