Register your child for In-person Robotics Workshop on 28th April at DC, Tracy, CA. Reserve a Seat today!

tect-corner-img

This test is as easy as pi


Author: Nav
Category: General

Hello,

I am Navraj Khurmi and I am 13 years old and in year 8.

When I first started looking into c

Hello,

I am Navraj Khurmi and I am 13 years old and in year 8.

When I first started looking into computer-based skills I came across moonpreneur, I looked into robotics starting from the basics and sensors, furthermore, I wanted to take my skills to another level and so I ventured into python, this opened up a variety of aspects to coding which I had never experienced before, along this journey Akshay Tambe helped me push through. Now let me present the very first game that I created…Introducing THE MATHS QUIZ:

import time
print(“This is a Maths quiz game.”)
time.sleep(2)
print(“INSTRUCTIONS.”)
time.sleep(2)
print(“1.This has 10 questions.”)
time.sleep(2)
print(“2.Each question consists of 2 marks.”)
time.sleep(2)
print(“3.There are multiple choice questions.”)
time.sleep(2)
print(input(“PRESS ENTER TO START”))

Option=0
Marks=0
cor_ans=0
print(“Que 1, x+5=7,Find the value of x”)
print(“1.4\n2.7\n3.2\n4.90”)
Option=int(input(“ENTER ANSWER: 1-2-3-4:”))
if (Option==3) :
Marks+=2
cor_ans+=1
else :
Marks-=2
print(“\n”)

print(“Que 2, 2x=4,Find the value of x”)
print(“1.4\n2.7\n3.2\n4.7”)
Option=int(input(“ENTER ANSWER: 1-2-3-4:”))
if (Option==3) :
Marks+=2
cor_ans+=1
else :
Marks-=2
print(“\n”)

print(“Que 3, x+7=10,Find the value of x”)
print(“1.4\n2.7\n3.3\n4.7”)
Option=int(input(“ENTER ANSWER: 1-2-3-4:”))
if (Option==3) :
Marks+=2
cor_ans+=1
else :
Marks-=2
print(“\n”)

print(“Que 4, 5x-8=7,Find the value of x”)
print(“1.4\n2.7\n3.3\n4.90”)
Option=int(input(“ENTER ANSWER: 1-2-3-4:”))
if (Option==3) :
Marks+=2
cor_ans+=1
else :
Marks-=2
print(“\n”)

print(“Que 5, 2x+7=9,Find the value of x”)
print(“1.1\n2.907\n3.4\n4.90”)
Option=int(input(“ENTER ANSWER: 1-2-3-4:”))
if (Option==1) :
Marks+=2
cor_ans+=1
else :
Marks-=2
print(“\n”)

print(“Your results are”,Marks,”out of 10″)
print(“No of correct answers: “,cor_ans)
print(“No of incorrect answers: “,5-cor_ans)
print(“Percentage: “,Marks*10,”%”)
print(“\n”)
print(“Thanks for playing!”)

 

There are 5 questions to this code… can you figure them out?

I have stated the instructions, in the beginning, this is a multiple-choice quiz…Will you pass?

You will need to answer with “1,2,3,4” which is linked with a specific value.

LET THE QUIZ BEGIN…

 

Yours sincerely,

Navraj Khurmi

3 126

Leave a comment