Youโ€™re the Expert!

pynfinity

Code Playground

Chapter 1

What is Programming? ๐Ÿค–

Programming is like giving instructions to a robot. You tell the computer exactly what to do, step by step โ€” and it follows your orders perfectly!

๐Ÿค–

Click the buttons to give instructions:

See? You just programmed a robot! Each button is an instruction.

Chapter 2

Variables & Memory ๐Ÿ“ฆ

Variables are like labeled boxes where you store things. Each box has a name and holds a value โ€” just like a locker!

๐Ÿ‘† Click a value, then click a box to store it!

42 "Hello" True 3.14 "Python"
age?0x7f01
name?0x7f02
ready?0x7f03
age = ?
name = ?
ready = ?
Chapter 3

Data Types ๐ŸŽจ

Not all data is the same! Numbers, text, true/false values โ€” each has its own type. Click to explore!

๐Ÿ”ข
Integer
42, -7, 0
๐Ÿ“
String
"Hello!"
โœ…
Boolean
True / False
๐Ÿ“‹
List
[1, 2, 3]
๐Ÿ‘† Click a type to learn more!
Chapter 4

How Code Runs โš™๏ธ

When you write code, a compiler/interpreter translates it into something the computer understands โ€” like a translator between you and the machine!

๐Ÿ“
Your Code
โ†’
๐Ÿ”
Lexer
โ†’
๐ŸŒณ
Parser
โ†’
๐Ÿ”ง
Compiler
โ†’
๐Ÿ’ป
Machine
Output will appear here...
Chapter 5

Conditions: if / else ๐Ÿ”€

Programs make decisions! Like a fork in the road โ€” if something is true, go left; otherwise, go right.

Is it raining?
No โ˜€๏ธ
โ˜‚๏ธ
if raining:
if raining == True:
  print("Take umbrella!")
๐Ÿ˜Ž
else:
else:
  print("Enjoy sunshine!")
Chapter 6

Loops: Repeat! ๐Ÿ”„

Why write the same thing 100 times when you can use a loop? Loops repeat actions for you โ€” like a merry-go-round!

for i in range(0):
  print("Star โญ", i)
Count: 0
Chapter 7

Functions: Magic Machines ๐ŸŽฐ

A function is like a magic machine โ€” put something in, and something useful comes out! You define it once, use it forever.

def double(x):
  return x * 2

Pick an input to feed the machine:

?
โ†’
โš™๏ธ double(x)
โ†’
?
Chapter 8

Classes: Blueprints ๐Ÿ—๏ธ

A class is like a cookie cutter โ€” it's a blueprint. You can stamp out many objects from one design!

๐Ÿพ class Pet:
name species sound

def speak(self): print(self.sound)

๐ŸŽ‰ You're a Coder Now!

You just learned the building blocks of programming. Every app, game, and website is built with these ideas. Keep exploring!

๐Ÿ“š Explore Courses


Pynfinity
Install Pynfinity Add to home screen for the best experience