My Channel

PYTHON QUIZ | A QUIZ MADE ON PYTHON | VISIT IT | FUN, EXCITING QUIZ MADE O N PYTHON USING PYCHARM | VISIT, READ, SHARE, FOLLOW, SUBSCRIBE, COMMENT, REVIEW


If you guys love to make a quiz in google forms, MS Forms, etc. Today we will see how to make a quiz in Pycharm using python.

Before I tell you how to do it. Let me first tell you what Python is.

Python:
Python is a programming language used for creating many programs. It is an object-oriented programming language with high-level programming language with dynamic semantics.

Python is the third easiest programing language in the world.

For more information About Python, Click ''Python''

I will not go briefly but will share the code which you can copy and paste to use.

so, here is the code:


import time

A = input("Hi! Enter Your Name:")

print("Welcome " + A)

B = input("Do you want to participate in the quiz? Type YES/NO:")

print(B)

if B == 'YES':

    print('Welcome! We would like to have you in the game...')

    time.sleep(2)

    print('Instructions: 1.Options will be given and write the correct answer according to the questions.'

          '2. Your Data will not be stored. 3.Write as it is given in the options even for YES/NO'

          '4.This quiz is Case Sensitive, so be careful while you answer.5.Hope you enjoy the game...  ')

    time.sleep(2)

    print("Here is your first question...")

    time.sleep(2)

    C = ('1.Who Found Python?')

    print(C)

    print('Here are the Options: 1.Guido van Rossum; 2.James Gosling; 3.James Watt;4.Dr.Ambedkar')

    C1 = input("Enter Answer:")

    if C1 == 'Guido Van Rossum':

        print('Correct! Cool...You got it')

    else:

        print('Wrong! Good Luck Next Time!')

    D = ('1.When was Python found?')

    print(D)

    print('Here are the Options: 1.2021; 2.1912; 3.1989; 4.2013')

    D1 = input("Enter Answer:")

    if D1 == '1989':

        print('Correct! Cool...You got it')

    else:

        print('Wrong! Good Luck Next Time!')

else:

    print('Byee! We are Sad☹☹☹')



This is the code in a different font. This quiz will ask your name, and you will be asked several questions which have to be answered by the user and tells if the answer entered is correct or not. Intially it asks 'Do you want to take part or not?'. If the reply for that is yes it would continue into the quiz and if the reply is no, the quiz would reply 'Bye'.

If you want more questions, copy the code for an individual question and paste it before "print('Byee! We are Sad☹☹☹')".

For clarification copy this:

   D = ('1.When was Python found?')

    print(D)

    print('Here are the Options: 1.2021; 2.1912; 3.1989; 4.2013')

    D1 = input("Enter Answer:")

    if D1 == '1989':

        print('Correct! Cool...You got it')

    else:

        print('Wrong! Good Luck Next Time!')

You can edit this to make a different question.

Catch up with you next time on some good and interesting topics

Code is not copyrighted as I prepared the code.
By the Blog Author



Post a Comment

5 Comments

  1. This is a python quiz code. Please try using any python editor and Tell me your comment below.

    ReplyDelete
  2. Thank You!!!
    Please do Share this with all your Friends and Family.

    ReplyDelete