Pick an option and check it. The explanation shows after each answer. Take as long as you like; nothing is timed and nothing is sent.
18 questions
Question 1 · easy
Which sentence best describes a program?
A program is a list of exact instructions, followed one by one in order by a computer that cannot guess. The computer never fills in a rough idea or sorts shuffled steps for you, and the machine itself is the computer, not the program.
Question 2 · easy
Priya checks her exam result on a website. She types her roll number and clicks Submit. The website looks up her marks in its records, and the page shows "Passed with 412 marks". Which part is processing?
Processing is the work done inside that you cannot see, here the website looking up the marks. Typing the roll number and clicking Submit are input (Priya gives them), and the message on the page is output (it comes back to her).
Question 3 · easy
Why do we write programs in a programming language like Python instead of talking to the processor directly?
A processor understands only tiny machine instructions made of 0s and 1s, so Python sits in the middle and translates lines that read close to English. A processor does not understand plain English, Python never guesses missing steps, and Python is not built into the chips.
Question 4 · easy
What does this program print?
print("Ravi scored 50")
print shows the text inside the quotes, and the quotes themselves are not printed. The screen shows the result, not the line of code, and a number inside quotes is just part of the text.
Question 5 · easy
Nisha runs this line and Python stops with an error instead of showing Good night.
Print("Good night")
What is the fix?
Python treats capital and small letters as different, so Print is not the same as print and Python stops with an error. Removing the quotes would cause a new error, and a full stop or capital letters in the text do not fix the misspelt word.
Question 6 · easy
Ravi wants to try Python on his college library computer. He can use the browser but is not allowed to install anything. Which way should he use?
Google Colab runs Python in the browser with nothing to install: type in a code cell and press the run button or Shift + Enter. Installing Python 3.12 and Visual Studio Code is the laptop way, which he cannot do here, and an address bar or chat message does not run Python.
Question 7 · medium
Arjun writes steps for a robot to plant a seed in a pot, but they got shuffled. Which order works?
Step 1: Water the soil on top of the seed Step 2: Put a seed in the hole Step 3: Dig a small hole in the pot Step 4: Cover the seed with soil
Ask what each step needs: the seed needs a hole (3 before 2), covering needs the seed in place (2 before 4), and watering the soil on top needs that soil (4 before 1). Starting with water, watering before covering, or dropping the seed before digging all break a step that needs an earlier one.
Question 8 · medium
Sameer writes steps for a robot to charge his phone. One step is missing. Which one?
Step 1: Take the charger out of the drawer Step 2: Plug the charger into the wall socket Step 3: Switch on the socket Step 4: Wait till the battery shows 100% Step 5: Pull the cable out of the phone
Step 5 pulls the cable out of the phone, but no step ever puts it in, so the phone never charges; the robot needs "Connect the cable to the phone" before it waits. Switching off the socket or checking the battery are things a person might do, but no later step needs them, and plugging in again only repeats step 2.
Question 9 · medium
What does the computer show after these instructions?
Put 12 in the box named runs
Add 6 to runs
Add 4 to runs
Show runs
Trace the box: runs is 12, then 12 + 6 = 18, then 18 + 4 = 22, and Show gives 22. Show gives the value inside the box, not its label runs; 12 forgets both Add lines, and 10 adds only the two added numbers.
Question 10 · medium
What does this program print?
print("Catch the bus")
print("Lock the door")
print("Pack the bag")
Python runs the lines from top to bottom exactly as written, and each print shows its text on a new line. It does not reorder the steps into the order that makes sense in real life, and three separate print lines never share one line.
Question 11 · medium
Asha wants the screen to show Bhubaneswar, but this line stops with an error.
print(Bhubaneswar)
Which line fixes it?
Text must sit inside matching quotes; without them Python looks for a box named Bhubaneswar, finds none and stops with an error. A capital P, missing brackets or extra brackets do not add the quotes, so each still stops with an error.
Question 12 · medium
What does this program print?
print("40 + 25")
print(40 + 25)
Inside quotes, 40 + 25 is just text and is shown as it is; without quotes Python works out the sum and shows 65. Thinking both lines add, or both lines show text, misses what the quotes do, and the quotes themselves are never printed.
Question 13 · hard
Nisha's auto-fare app follows these instructions. What does it show?
Put 30 in the box named fare
Put 20 in the box named tip
Add 10 to fare
Put 45 in fare
Show fare
fare is 30, then 30 + 10 = 40, then Put 45 replaces it, so Show gives 45; tip is a separate box and never touches fare. 85 piles every value on top of the old one, 40 skips the replacing Put, and 65 mixes the tip box into fare.
Question 14 · hard
Arjun saves these two lines in a file named bill.py on his laptop and runs it in Visual Studio Code. What appears in the terminal panel?
40 * 3
print("Bill is ready")
When a file runs, a bare calculation like 40 * 3 is worked out but shown nowhere; only print puts something on the screen. So the only output is Bill is ready, not 120 above it, and Python never shows the line 40 * 3 itself.
Python follows one instruction at a time from the top: line 1 shows Toss won, line 2 uses Print with a capital P, which Python does not know, so it stops there and line 3 never runs. Python never corrects the spelling, never skips a broken line and carries on, and never runs lines out of order.
Question 16 · easy
Kabir writes steps for a robot that makes nimbu pani. One step says: Add some sugar to the glass. What is wrong with this step for a computer?
A computer follows each step exactly as written and cannot guess, so a vague word like some leaves it with no amount to use; writing 2 spoons fixes it. Picking a sensible amount or stopping to ask is what a person would do, not a computer, and order is not the only thing that matters: the wording must be exact too.
Question 17 · medium
Kabir wants the screen to show Jai Jagannath. Which line does it?
Python accepts double quotes or single quotes around text, as long as both ends match, so print('Jai Jagannath') shows Jai Jagannath. print("Jai Jagannath') opens with a double quote and never closes it, Print with a capital P is a name Python does not know, and without quotes the two words are not text at all, so each of those stops with an error.
Question 18 · hard
A snack machine at Cuttack station follows these instructions. What does it show?
Put 20 in the box named paid
Put 15 in the box named price
Put paid minus price in the box named change
Put 50 in the box named paid
Show change
Line 3 works out 20 minus 15 at that moment and puts 5 in change. Line 4 replaces the value in paid with 50 but never touches change, so Show gives 5. 35 works the sum out again with the new paid, as if change kept the rule instead of the value; 50 is the value in paid, a different box; paid minus price shows the words of the instruction instead of the value in the box.
Your answers stay in this browser tab. Nothing is sent or saved.