A quick reference poster for Python 3 covering the key programming constructs (sequencing, selection and repetition). Also includes commonly used operators.
A quick reference poster for Python 3 covering the key programming constructs (sequencing, selection and repetition). Also includes commonly used operators.
Output text print(Some text) Text input name=input(What is your name? ) Number input num=int(input(Enter a number: )) Join text and a variable together print(Your score is,score) IF statement if num == 4: print(Well done) else: print(Try again) Generate a random number import random num=random.randint(1,10) For loop for x in range(0,10): print(Python Rocks) While loop while password!=python: password=input(Enter your password: ) == Is equal to > Is greater than != Is not equal to < Is less than >= Is greater than or equal to <= Is less than or equal to and And or Or Logical Operators Example Code