Welcome to Hedy! Here you can learn how to program step by step.
Try the code yourself! The yellow button copies the example code to your programming field.
Then push the green 'Run code' button under the programming field to run the code.
Ready? Then go to the next adventure to learn how to make your own codes!
drucke Hello world!
The print command
You can print text to the screen using the drucke command.
drucke Hi there, programmer!
drucke Welcome to Hedy!
Exercise
In Hedy you will find exercises in every adventure. An exercise allows you to practise the new commands and concepts, and lets you give your own twist to the example codes.
In this exercise you will see a pink blank space. You have to fill something in the place of the blank space before the code can be run.
Fill in the drucke command in the blank space and then add five more lines of code. Each line has to start with a drucke command.
Have fun!
_ Hello!
The ask command
Now that you can use the drucke command, you are ready to learn the next command: frage. With the frage command, you can ask a question. Check it out:
drucke Hello!
frage What is your name?
The echo command
If you want the computer to repeat the answer back to you, you can use the echo command. The answer will be echoed back at the end of the sentence, so in this example after hello.
drucke Hello!
frage What is your name?
echo hello
Exercise
Try out the frage and echo commands. Firstly, fill in the blanks to make this program work.
Then ask 2 more questions using the frage command, after each frage use an echo to print the answer on the screen.
_ How are you doing?
_
Create your own online pet parrot that will copy you!
drucke Im Hedy the parrot
frage whats your name?
echo
echo
Exercise
Copy the example code to your input screen by clicking on the yellow button.
Make the parrot ask a different question. Fill in the blanks in the example!
Extra You can also let the parrot ask multiple questions. Type in some more lines of code beneath your own code.
drucke Im Hedy the parrot
frage _
echo
echo
In level 1 you can start with a rock, paper, scissors game.
With frage you can make a choice, and with echo you can repeat that choice.
drucke what do you choose?
frage choose from rock, paper or scissors
echo so your choice was:
Exercise
Instead of using words, you could also use emojis: ✊✋✌
Can you create a code using emojis?
drucke what do you choose?
frage choose from _
echo so your choice was:
In this adventure you are working towards making a game in which you have to escape from a haunted house by picking the correct door.
If you pick the right door you'll survive, but if not a terrible monster might...
In level 1 we start our haunted house game by making up a scary story and ask the player what monster they'll see in the haunted house.
drucke How did I get here?
drucke I remember my friend telling me to go into the old mansion...
drucke and suddenly everything went black.
drucke But how did I end up on the floor...?
drucke My head hurts like Ive been hit by a baseball bat!
drucke What's that sound?
drucke Oh no! I feel like Im not alone in this house!
drucke I need to get out of here!
drucke There are 3 doors in front of me..
frage Which door should i pick?
echo I choose door
drucke ...?
Exercise
Copy the example code to your input screen by clicking the yellow button.
Now finish the story by adding at least 5 lines of code.
Remember to start each line of codes with a drucke command.
In level 1 you can make a story with a different main character that you enter yourself.
In the first line, use frage and ask who the main character of the story will be.
After that first line, start with drucke if the sentence needs to be printed.
You use echo if you want your main character to be at the end of the sentence.
frage The main character of this story is
drucke The main character is now going to walk in the forest
echo They're a bit scared,
drucke They hear crazy noises everywhere
drucke They're afraid this is a haunted forest
Exercise
Now create your own story of at least 6 lines of code.
This story cannot be the same as the example code.
Use at least one frage and one echo command.
You can make it about any topic you like.
If you can't think of a topic, use one of our choices: going to the movies, a sports match or a day at the zoo.
In this level you'll learn how to use the spiele command to play a tune!
Type spiele followed by the note you want to play. The scale goes C-D-E-F-G-A-B.
As you can see there are 7 different letters, but we can play more than just 7 notes.
Type a number between 0 and 9 behind the letter to choose the scale, for example after B4 comes C5.
C0 is the lowest note you can play, B9 is the highest.
Exercise
Try out the example code and then play around with it! Can you create your own melody?
In the next level you'll learn how to play some existing songs.
You can also use Hedy to draw. By combining turns and lines, you can make a square or stairs!
Using vorwärts you draw a line forwards. The number behind it determines how far the turtle will walk. drehe rechts turns a quarter turn in clockwise direction, drehe links turns counter clockwise.
If you want to go backwards, you use the vorwärts command but with a negative number. So for example vorwärts -100
vorwärts 100
drehe links
Exercise
This is the start of a little staircase. Can you make it have 5 steps?
In level 1 you can make your own virtual restaurant and take your guests' orders.
Exercise
Copy the example code into your input screen by clicking the yellow button.
Firstly, fill in the correct command on the blanks to make to code work properly.
Then add at least 4 more lines of code to the restaurant program.
Ask the costumer what they would like to drink and ask if they want to pay with cash or card.
Lastly, think of a nice way to say goodbye to your costumer.
drucke Welcome to Hedy's restaurant 🍟
_ What would you like to order?
echo So you would like to order
drucke Thank you for your order!
drucke It's on its way!
Have you ever been to a carnival and had your future predicted by a fortune teller? Or have you ever played with a magic eight ball?
Then you probably know that they can't really predict your future, but it's still fun to play!
In the upcoming levels you can learn how to create your own fortune telling machine!
In level 1 you can start off easy by letting Hedy introduce herself as a fortune teller and let her echo the players' answers.
Like this:
_ Hello, I'm Hedy the fortune teller!
_ Who are you?
_ Let me take a look in my crystal ball
_ I see... I see...
_ Your name is
Exercise
Copy the example code into your input screen and fill in the blanks to make the code work.
Extra Change the code and let the fortune teller not only predict your name, but also your age, your favorite sports team or something else about yourself.
Welcome to a debugging adventure. Debugging a code means getting rid of mistakes in the code.
That means that in these debugging adventures, we will show you code that does not work yet.
You will have to figure out what's wrong and correct the mistakes.
Exercise
Debug this code. Good luck!
Warning! This code needs to be debugged!
drucke I love programming
Do you love programming too?
echo
drucke What are your hobbies?
echo Your hobbies are