Skip to content

samuellhwarren/Project-Code-Penguin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง CodePenguin - The Cutest Programming Language in the World! ๐Ÿง

Once upon a time, in a magical land of ice and snow, there lived a colony of adorable penguins who loved to code! ๐Ÿงโœจ

Welcome, Little Chick! ๐Ÿง

CodePenguin is a special programming language made just for you! It's like telling a story about penguins, but the story is actually a computer program! How cool is that? ๐ŸŽ‰

Why CodePenguin? ๐ŸŒŸ

  • ๐Ÿง Super Fun! Every program reads like a cute penguin adventure!
  • ๐ŸŽ“ Secretly Educational! You're learning real programming while having fun!
  • ๐ŸŒˆ Colorful & Beautiful! Everything is bright and cheerful!
  • ๐Ÿ’ Kid-Friendly! Made especially for ages 9 and up!

Getting Started ๐Ÿš€

Installation

First, make sure you have Python 3 installed on your computer! Then:

# Clone this repository (or download it)
cd "Project Code Penguin"

# That's it! You're ready to go! ๐ŸŽ‰

Running Your First Program ๐Ÿง

Let's write your very first CodePenguin program! Create a file called hello.cp:

An adorable colony gathers called HelloWorld

squawk "๐Ÿง Hello, World! Welcome to CodePenguin! ๐Ÿง"

The colony joyfully disperses

Now run it:

python codepenguin.py hello.cp

Wow! Did you see that? You just wrote your first program! ๐ŸŽ‰

The Interactive Playground (REPL) ๐ŸŽฎ

Want to try things out quickly? Start the interactive playground:

python codepenguin.py

You'll see this friendly message:

๐Ÿง  Welcome to CodePenguin! ๐Ÿง

   Brr-ello, little chick! Ready to waddle some code?

Type your penguin story and press Enter twice to run it!

๐Ÿง >>>

Just type your code and press Enter twice to run it! It's that easy! ๐Ÿง

The Penguin Language Guide ๐Ÿ“š

Every Program Starts and Ends Like This:

An adorable colony gathers called MyProgram

    preen Your code goes here!

The colony joyfully disperses

Variables (Gifting Pebbles) ๐Ÿ’Ž

Give a penguin a pebble (variable) with a value:

gift pebble name with "Penguin"
gift pebble age with 5
gift pebble favoriteNumber with 42

Printing (Squawking) ๐Ÿ—ฃ๏ธ

Make your penguin squawk (print) something:

squawk "Hello, world!"
squawk name
squawk "I am "
squawk age
squawk " years old!"

Lists (Crรจches of Chicks) ๐Ÿฃ

Create a list of things:

crรจche of chicks friends = ["Alice", "Bob", "Charlie"]
crรจche of chicks numbers = [1, 2, 3, 4, 5]

Loops (Marching and Porpoising) ๐Ÿง

For loops - March over a list:

march over friends giving each friend
    squawk "Hello, "
    squawk friend
    squawk "!"

While loops - Porpoise while something is true:

gift pebble count with 10

porpoise while count > 0
    squawk count
    gift pebble count with count - 1

squawk "Blast off! ๐Ÿš€"

Functions (Huddles) ๐Ÿค—

Create a huddle (function) that penguins can dive into:

huddle greet name
    squawk "Hello, "
    squawk name
    squawk "! ๐Ÿง"
end huddle

dive into greet("Penguin")

Making Decisions (If Statements) ๐Ÿค”

Help your penguin make choices:

gift pebble age with 10

if age >= 10
    squawk "You're a big penguin!"
else
    squawk "You're still a little chick!"

Random Numbers ๐ŸŽฒ

Get a random number:

gift pebble luckyNumber with random pebble between 1 and 100
squawk "Your lucky number is "
squawk luckyNumber

Shuffling Lists ๐Ÿ”€

Mix up a list:

crรจche of chicks colors = ["red", "blue", "green"]
huddle-shuffle colors

Saving to Files (Nesting) ๐Ÿ“

Save something to a file:

gift pebble score with 1000
nest "highscore.txt" with score

Math Operations โž•โž–โœ–๏ธโž—

Do math just like in school:

gift pebble a with 10
gift pebble b with 5

squawk a + b    preen Addition
squawk a - b    preen Subtraction
squawk a * b    preen Multiplication
squawk a / b    preen Division

Comments (Preening) ๐Ÿ’…

Add notes to your code:

preen This is a comment! Penguins use it to leave notes!
gift pebble x with 5  preen This sets x to 5

Example Programs ๐ŸŽฎ

Check out the examples/ folder for lots of fun programs:

  1. Hello World - Your first program! ๐Ÿง
  2. Variables - Learning about pebbles! ๐Ÿ’Ž
  3. Number Guessing Game - A fun game! ๐ŸŽฎ
  4. Fibonacci - Math magic! โœจ
  5. Lists - Working with crรจches! ๐Ÿฃ
  6. Arduino LED - Generate MicroPython code! ๐Ÿ’ก
  7. Turtle Penguin - Draw a penguin! ๐ŸŽจ
  8. Feed the Penguin - A complete game! ๐ŸŸ
  9. Shuffle Game - Mix things up! ๐Ÿ”€
  10. Math Fun - Practice math! โž•
  11. Functions - Learn about huddles! ๐Ÿค—
  12. Countdown - Count backwards! โฐ
  13. File Operations - Save your data! ๐Ÿ’พ
  14. Random Adventure - Daily adventures! ๐ŸŽฒ

Try running them all:

python codepenguin.py examples/01_hello_world.cp
python codepenguin.py examples/02_variables.cp
# ... and so on!

Error Messages ๐Ÿง๐Ÿ’ฌ

If something goes wrong, don't worry! CodePenguin will help you with friendly messages:

  • "Oops! A penguin slipped on the ice โ€“ you forgot to end your huddle!"
  • "That pebble wasn't gifted yet! Try 'gift pebble name with value' first."
  • "The crรจche is empty! You tried to march over nothing."

Every error message is designed to help you learn! ๐ŸŽ“

Advanced Features ๐Ÿš€

Emperor Mode (Strict Mode) ๐Ÿ‘‘

For more experienced penguins, you can enable strict mode:

emperor mode on

An adorable colony gathers called StrictProgram

    preen This mode catches more errors!

The colony joyfully disperses

Piping (Tobogganing) ๐Ÿ›ท

Chain operations together:

gift pebble result with 10 โ†’ toboggan โ†’ multiply(2)

Tips for Young Programmers ๐ŸŒŸ

  1. Start Simple! Begin with hello world and work your way up!
  2. Read the Examples! The examples folder has lots of great code to learn from!
  3. Experiment! Try changing things and see what happens!
  4. Have Fun! Programming should be fun! If you're stuck, take a break! ๐Ÿง
  5. Ask for Help! It's okay to ask questions! That's how we learn!

What You're Really Learning ๐ŸŽ“

While you're having fun with penguins, you're secretly learning:

  • โœ… Variables and data types
  • โœ… Functions and code organization
  • โœ… Loops and iteration
  • โœ… Conditionals and decision-making
  • โœ… Lists and data structures
  • โœ… File I/O
  • โœ… Programming concepts that work in any language!

Contributing ๐Ÿค

Want to make CodePenguin even better? We'd love your help! ๐Ÿง

License ๐Ÿ“œ

CodePenguin is free and open source! Use it, learn from it, and share it with your friends! ๐ŸŽ‰

Thank You! ๐Ÿ™

Thank you for choosing CodePenguin! We hope you have as much fun learning to code as we had making this language! ๐Ÿงโœจ

Remember: Every great programmer started with their first "Hello, World!" You're on an amazing journey! ๐ŸŒŸ


Happy Coding, Little Penguin! ๐Ÿง๐Ÿ’™

Made with โค๏ธ for young programmers everywhere

About

A fun Penguin themed Python interpreter

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages