COMPUTER SCIENCE CAFÉ
  • WORKBOOKS
  • BLOCKY GAMES
  • GCSE
    • CAMBRIDGE GCSE
  • IB
  • A LEVEL
  • LEARN TO CODE
  • ROBOTICS ENGINEERING
  • MORE
    • CLASS PROJECTS
    • Classroom Discussions
    • Useful Links
    • SUBSCRIBE
    • ABOUT US
    • CONTACT US
    • PRIVACY POLICY
  • WORKBOOKS
  • BLOCKY GAMES
  • GCSE
    • CAMBRIDGE GCSE
  • IB
  • A LEVEL
  • LEARN TO CODE
  • ROBOTICS ENGINEERING
  • MORE
    • CLASS PROJECTS
    • Classroom Discussions
    • Useful Links
    • SUBSCRIBE
    • ABOUT US
    • CONTACT US
    • PRIVACY POLICY
LEARN TO CODE    >     PYTHON     >     GETTING STARTED
NEXT PAGE >
VARIABLES AND DATA TYPES
Picture
SECTION 1 | DOWNLOADING PYTHON
It is free to download and should only take a few seconds. Watch the video and click the link below to download.

CLICK HERE TO VISIT THE OFFICIAL PYTHON SITE TO DOWNLOAD PYTHON

There is two parts to the Python software. 1: Python idle, 2: Python Shell. The Python idle is where you write your code and the Python shell is what opens when you run your code. Although you can write code in the Python shell my advise is don't. 
SECTION 2 | YOUR FIRST CODE | HELLO WORLD
To get started and in this section we will simply print (output to the screen) the text 'hello world'. Just to check everything is working as expected. Follow the steps 3 below:

1: Open the Python Idle (not the Launcher)
2: You will need to create a new file so, go to FILE and click NEW FILE. (skip if you are using a different platform)
3: In the Python idle type the following 1 line of code:
print ("Hello World")
4: To run your program press F5 on your keyboard (on a Mac hold 'fn' and press 'F5')

The program should open the Python shell and print the words : Hello world
  • The word print is a command word and might highlight in a different colour, it is used to print/output text and numbers to your screen.
  • The ( ) are used to contain what you want to print.
  • The speech marks  " " tell Python that it is just simple text. Text is called a 'string' in programming terms.
SECTION 3 | VISUAL STUDIO CODE
For many of the tutorials on this website we use Microsoft Visual Studio Code, whilst this might take some getting used to, it is a very helpful platform that has loads of features that will help you as you start to progress in your coding journey. We recommend downloading Visual studio Code and persevering with the daunting task of getting stated with what at first can be a confusing platform. The link below takes you to the official Visual Studio Code site.
Picture
VSC Download Page
TO GET STARTED WITH VISUAL STUDIOC CODE
1: Downloading and Installing Visual Studio Code (VSCode)
  • Open your web browser and navigate to the official Visual Studio Code website: https://code.visualstudio.com/
  • Click on the "Download for [Your OS]" button. (The website will automatically detect your operating system, e.g., Windows, macOS, or Linux.)
  • Once the download is complete, locate the installer in your downloads folder and double-click on it to start the installation process.
  • Follow the on-screen instructions to complete the installation. The default settings are usually sufficient for most users.
2. Installing the Python Extension for Visual Studio Code
  • Launch VSCode.
  • On the left sidebar, click on the Extensions icon (it looks like a square made of four smaller squares).
  • In the search bar at the top, type "Python".
  • Look for the Python extension by Microsoft (it should have the Microsoft logo and the name "IntelliSense" in the description).
  • Click on the Install button next to the Python extension.
3. Writing and Running Your First Python Code
  1. First, ensure you have Python installed on your computer(Follow SECTION 1 on this page). If not, download and install it from the official website: https://www.python.org/downloads/
  2. In VSCode, go to File > New File to create a new file.
  3. Save the file with a .py extension, for example, hello_world.py.
  4. In the new file, type the following code:

print("Hello, World!")

  • Save the file.
  • To run the file you can click the 'Play' button at the top right of the window (This will only appear after installing the Python extension 'Step 2'). Alternatively you can select 'Run without Debugging' from the drop down menu at the top of the window/screen.
You should see the output Hello, World! in the terminal at the bottom of the VSCode window.
WEB BROWSER IDE
Want a WEB BROWSER VERSION ? If you have a tablet or a chrome book you might want to use an online web browser platform for your python coding. Trinket is a great online version, it is easy to use and allows you to save and share your work. Trinket Online
Picture
NEXT PAGE | VARIABLES AND DATA TYPES
1
2
3
4
5
6
7
8
9
10
LEVEL 1: GETTING STARTED | Downloading Python and creating Hello World
LEVEL 2: VARIABLES AND DATA TYPES | Storing data in variables
LEVEL 3: OPERATORS | Performing calculations and comparisons
LEVEL 4: SELECTION | Using IF statements
LEVEL 5: ITERATION | Using FOR Loops and WHILE Loops
LEVEL 6: ARRAYS | Getting started with Lists
LEVEL 7: FUNCTIONS AND PROCEDURES | Breaking your code into logical sections
LEVEL 8: FORMATTING DATA | Further data manipulation
LEVEL 9: ERROR CHECKING | Using Try and Except to catch user errors
LEVEL 10: OBJECT ORIENTED PROGRAMMING | Getting to grips with OOP

 PYTHON QUICK REFERENCE
Picture
SUGGESTIONS
We would love to hear from you
SUBSCRIBE 
To enjoy more benefits
We hope you find this site useful. If you notice any errors or would like to contribute material then please contact us.