Beginner Python Programming

Python Beginner Programming

Programming & Python

Introduction

What is programming?

  • Giving the computer a set of detailed instructions
  • Scratch instructions - graphical drag and drop instructions 


What is Python Programming ?

  • Python is a text-based programming language

  • It takes a bit longer to learn than Scratch, but can be used to do much more

  • It is easy to learn compared to other programming languages like C++ and Java 
  • Can be used to write real world programs like web pages and artificial intelligence
  • Used in companies such as Google, NASA and Pixar 


Simple Commands

Command Python Scratch
Write to screen

Set a variable to a text string

Set a variable to a number

Change number variable by 1
     

 

https://repl.it/IoRE/6

Scratch and Python

Printing to the screen

Scratch

In Scratch the "say" block shows something to the screen

Python

  • In Python the command "print" displays information to the screen
  • You can print strings by putting them in quotes