Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
756 views

Python Quick Reference Poster

A quick reference poster for Python 3 covering the key programming constructs (sequencing, selection and repetition). Also includes commonly used operators.

Uploaded by

armbennett
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
756 views

Python Quick Reference Poster

A quick reference poster for Python 3 covering the key programming constructs (sequencing, selection and repetition). Also includes commonly used operators.

Uploaded by

armbennett
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Python Quick Reference

Description Example Code


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

You might also like