Star Student Builder logoStar Student Builder
← Systems, Data and the Way Out Std 9–12Project 4 of 4

The Same Program in Text

🎯 Take a project you have already built and write it again in Python β€” and see that you already know how to program.

πŸ’‘ The idea behind it

Blocks were never the point. Everything you learnt β€” loops, conditions, variables, functions, lists β€” is exactly what text languages have, with different punctuation.

🧱 Blocks you will need

define (My Blocks) β†’ defrepeat β†’ forforever β†’ while Trueif/else β†’ if/elsevariable β†’ variablelist β†’ list

πŸ”¨ Build it

  1. Take the quiz project from Std 6–8. Write its questions and answers as two Python lists.
  2. 'repeat (length of questions)' becomes 'for i in range(len(questions)):'.
  3. 'ask and wait' plus 'answer' becomes 'reply = input(questions[i])'.
  4. 'if answer = item i of answers' becomes 'if reply == answers[i]:'. Note the double equals β€” the one thing blocks protected you from.
  5. Run it. The same program, the same logic, twenty lines of text. You did not learn a toy; you learnt programming.

πŸš€ Make it harder

  • Rewrite the high-score insert in Python and then replace it with sorted().
  • Move to Star Blocks in Code Master, or to a Python tutorial β€” you are ready for either.

🐞 Bugs you will hit

  • '=' assigns and '==' compares. This single confusion accounts for most first-week Python errors.
  • Indentation is not decoration in Python β€” it is the syntax. What a block's C-shape showed you, spaces now show the computer.

⬇ Need Scratch itself?

Free from MIT, in a browser or as an offline app that needs no connection at all.

Get it β†’
Ask GuruAcharya Samayeshwar