Computer Programming is telling the computer what to do. In order for computers to do the cool things they do, a human being has to give them instructions. Computer programming is like giving a set of instructions to a computer in the same way a recipe is a set of instructions for making a cake. These instructions are written in a special language that the computer can understand called code.
Click on the IDLE3 icon on the shelf. It's the icon that looks like a penguin.
Then create a new file. You should now have two windows open. drag each one to each end of the screen so that it looks like this:
Write your code in the window on the right.
Open the Python Shell. Then, From the File menu, choose New File. This will open a new window where we will write our code
Write the following code in the window:
print('Hello World')
Follow these steps:
(
-
to type this on the the computer, press and hold the shift key and then press 9.'
- this key is located to the left of the enter key.
to type this on the the computer, simply press it.'
again )
-
to write this on the the computer, press and hold the shift key and then press 0.(
, '
, '
, and )
as special buttons on the keybaord that help the magic print button know what to print on the screen.
From the Run menu, click Run Module, or just press the F5 key
You will then be asked to save the file. Click OK.
Then, type your name in the box and then click Save
The output should look something like:
Hello World
>>>
If you get an error or something different:
Think of this print command as a sandwich:
print('Hello World')
(
, '
, '
, and )
are our buns. If we add a left-parentheses ((
)
to our code, we need a right-parentheses ()
) in order to close it. Otherwise, we don't have a bottom bun and our code will error out. Print("Hello World")
pint("Hello World")
print("Hello")
print(Hello World")
print("Hello World"
Copyright © KX Technology Group, LLC. All Rights Reserved.