In this week you will learn: the outcomes of the unit, what are variables and operators, the print function, conditional statements, and how to begin representing this in a flowchart design.
First check that your software can run python. If you are using Python IDLE or Replit you can use the following guide:
Open Python IDLE. After the >>> type:
print("Hello world")
In a new Python repl, click in the black window to the right and after the > type:
print("Hello world")
When you press return you should see the text below printed.
Hello world
If you are using another program and cannot figure out how to make it work, or if you cannot get Hello world to print in IDLE or Replit, then contact your tutor for guidance.
The command that you ran above was done in what is called the console. In this course we will write a whole file of code and then run it, rather than one line at a time like you do in the console. To write and run a file you would do the following:
In IDLE, click “File” then “New File” which will launch a new window where you type your code. You save that file using “File” then “Save”, and then run it with “Run” then “Run module”. The output appears in the console window.
In Replit you type your code into the middle white box between the file list and the console.
Then run it clicking the green Run button. The output appears in the black console area.