18 questions · untimed

Python first steps: Programs and computers

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?

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?

Question 3 · easy

Why do we write programs in a programming language like Python instead of talking to the processor directly?

Question 4 · easy

What does this program print?

print("Ravi scored 50")

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?

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?

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

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

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

Question 10 · medium

What does this program print?

print("Catch the bus")
print("Lock the door")
print("Pack the bag")

Question 11 · medium

Asha wants the screen to show Bhubaneswar, but this line stops with an error.

print(Bhubaneswar)

Which line fixes it?

Question 12 · medium

What does this program print?

print("40 + 25")
print(40 + 25)

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

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

Question 15 · hard

Ravi runs this program. What happens?

print("Toss won")
Print("Batting first")
print("Target 180")

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?

Question 17 · medium

Kabir wants the screen to show Jai Jagannath. Which line does it?

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

Next: Printing and error messages