Section 1

Preview this deck

x=1

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (39)

Section 1

(39 cards)

x=1

Front

int

Back

z=1j

Front

complex

Back

Python has two primitive loop commands

Front

while and for

Back

PIP

Front

Package manager for Python packages, or modules if you like.

Back

A function is a

Front

block of code which only runs when it is called.

Back

operators

Front

Arithmetic Assignment Comparison Logical Identity Membership Bitwise

Back

No command for

Front

declaring a variable

Back

If you skip the indentation

Front

you are given an error

Back

A function can return data as a

Front

result

Back

Four collection types

Front

Tuple Set Dictionary List

Back

Int

Front

a whole number, positive or negative, without decimals, of unlimited length

Back

Python uses indentation to

Front

indicate a block of code

Back

For

Front

iterating over a sequence/executing a set of statements. Less like the keyword programming language, and works more like an iterator method as found in other-object oriented programming languages.

Back

Set

Front

collection which is unordered and unindexed. No duplicate members. {}

Back

List

Front

collection which is ordered and changeable. Allows duplicate members. []

Back

create a list

Front

this = ["apples", "bananas", "cherries"] print (this)

Back

Docstrings can be

Front

one or multilined

Back

y=2.8

Front

float

Back

Tuple

Front

collection which is ordered unchangeable. Allows duplicate members. ()

Back

create a dictionary

Front

this = { "brand": "Ford" "model": "Mustang" "year": 1964 } print (this)

Back

create a tuple

Front

this = ("apples", "bananas", "cherries") print (this)

Back

You can pass data/parameters

Front

into a function

Back

A function is defined using the

Front

def keyword

Back

Comments start with

Front

# Ex: #this is a comment

Back

float

Front

a number, positive or negative, containing one or more decimals

Back

Module

Front

Same as a code library; a file containing a set of function you want to include in your application.

Back

While

Front

Execute a set of statements as long as a condition is true.

Back

complex

Front

written with a j as the imaginary part

Back

Triple quotes are used at the end and the beginning of a

Front

docstring

Back

In python indentation is

Front

important

Back

Docstrings are also

Front

comments as well

Back

Dictionary

Front

collection which is unordered, changeable, and indexed. No duplicate members, they also have keys and values. {}

Back

Create a Module

Front

Save the code you want in a file with the file extension. .py

Back

A variable is created when

Front

you assign a value to it

Back

Numeric types in python

Front

int float complex

Back

Extended documentation capability

Front

docstrings

Back

create a def example

Front

--- my_function(): print("Hello from a function")

Back

create a set

Front

this = {"apples", "bananas", "cherries"} print (this)

Back

What is a package?

Front

Contains all the files you need for a module. Modules are code libraries you can include in your project.

Back