lua 1

Great, that actually fits the Pareto approach much better.

Instead of:

Q1 → wait → Q2 → wait...

We'll do:

10–20 carefully chosen MCQs that teach one concept from every angle. You answer all of them (e.g., 1:A 2:C 3:B...), then I check them, explain only the ones you got wrong, and give the next level.

This is much faster and better for pattern recognition.


Chapter 1 — Variables (Level 1)

Goal: Understand what a variable is and how to use it.

Q1

You're building a game. The player has 100 coins. Where should that value be stored?

A) Variable

B) print()

C) Loop

D) Function


Q2

Which Lua code stores the number 100 inside a variable named coins?

A)

coins = 100

B)

100 = coins

C)

print = 100

D)

coins == 100

Q3

After this code:

coins = 100
coins = 200

What is the value of coins?

A) 100

B) 200

C) 300

D) Error


Q4

What does this do?

print("Hello")

A) Stores "Hello"

B) Shows "Hello" on the screen

C) Deletes "Hello"

D) Creates a variable


Q5

Which line creates a variable called name?

A)

name = "Pramod"

B)

print("Pramod")

C)

"Pramod" = name

D)

name == "Pramod"

Q6

Which of these is a number?

A)

25

B)

"25"

C)

"twenty five"

D)

true

Q7

Which of these is text (a string)?

A)

500

B)

true

C)

"500"

D)

nil

Q8

You want to remember whether a light is ON or OFF.

Which data type fits best?

A) Number

B) String

C) Boolean

D) Function


Q9

Which value means yes/true?

A)

1

B)

"true"

C)

true

D)

"yes"

Q10

What is nil?

A) Zero

B) Empty string

C) "Nothing is stored"

D) False


Q11

What will this print?

age = 21
print(age)

A)

age

B)

21

C)

"age"

D) Error


Q12

You have:

score = 50
score = score + 10

What is score now?

A) 10

B) 50

C) 60

D) 510


Q13

Which operator assigns a value?

A)

=

B)

==

C)

+

D)

:

Q14

Which operator checks if two values are equal?

A)

=

B)

==

C)

+=

D)

:

Q15

Which variable name is the best choice?

A)

x

B)

abc123xyz

C)

playerHealth

D)

var1

🎯 Mini Challenge (No MCQ)

You want to store:

  • Your name

  • Your age

  • Whether you're learning Lua (yes)

Write 3 lines of Lua code to store those values in variables.


Reply format

1:A
2:A
3:B
...

15:C

Mini Challenge:
<your code>

One more thing: I won't just teach Lua, I'll also teach the thinking behind programming. That way, when you later learn Python, JavaScript, or any other language, about 70% of the concepts will already feel familiar.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.