Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

quiz game in python

import turtle
q1 = input("Do you wanted to play our game Y/N?
--->")
q1= q1.lower()
if q1== "y":
          print("ok then let's start")
          a=input("What does cpu stands for?
-->")
          a=a.lower()
          if a=="central processing unit":
                    print("the answer "+a+" is correct! So congratulations")
          else:
                    print("the answer "+a+" is incorrect")
          b=input("What does ALU stands for?
-->")
          b=b.lower()
          if b=="arthemetical logic unit":
                    print("the answer "+b+" is correct! So congratulations")
          else:
                    print("the answer "+b+" is incorrect")
          c=input("What does cu stands for?
-->")
          c=c.lower()
          if c=="control unit":
                    print("the answer "+c+" is correct! So congratulations")
          else:
                    print("the answer "+c+" is incorrect")
          d=input("What does SSD stands for?
-->")
          d=d.lower()
          if d=="solid state disk":
                    print("the answer "+d+" is correct! So congratulations")
          else:
                    print("the answer "+d+" is incorrect")
          e=input("What does MU stands for?
-->")
          e=e.lower()
          if e=="memory unit":
                    print("the answer "+e+" is correct! So congratulations")
          else:
                    print("the answer "+e+" is incorrect")
else:
          print("ok then next time")
          quit
Comment

PREVIOUS NEXT
Code Example
Python :: get list from list python 
Python :: python x = x + 1 
Python :: miles to km in python 
Python :: docstring python 
Python :: python symbol 
Python :: any and all in python3 
Python :: how to check if user pressed enter in python 
Python :: what is a thread in os 
Python :: python if elif else syntax 
Python :: how to if in pythob 
Python :: text detection from image using opencv python 
Python :: Try using .loc[row_indexer,col_indexer] = value instead 
Python :: python function to do comparison between two numbers 
Python :: autopy python not installing 
Python :: odd number in python 
Python :: use chrome console in selenium 
Python :: how to check if a list is empty in python 
Python :: python bigquery example 
Python :: sphinx themes 
Python :: TypeError: can only concatenate str (not "method") to str 
Python :: to text pandas 
Python :: how to remove .0 from string column with empty strings in python 
Python :: why is there a lot of numbers in python 
Python :: shebang line python 
Python :: show only lower diagonal in sns pairplot 
Python :: findout age in python 
Python :: tranking de perosnas python 
Python :: make a effective figure in python 
Shell :: get cpu frequency linux 
Shell :: stop apache server 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =