Cell biology flash cards
Flash cards on cell structure, organelles, plant and animal cells, bacteria, diffusion, osmosis, active transport, mitosis and microscopy for school biology.
Flash card deck22 cardsBeginnerAnyone
Twenty-two flash cards on Python fundamentals: variables, data types, lists, dictionaries, loops, functions and common errors, with short code examples.
Free to use, edit, print and study. No account needed: your set stays on this device.
print()
Displays output on the screen.
print('Hello, world') shows Hello, world.
Variable
A name that stores a value. Python creates it when you assign to it with =.
score = 10
Basic data types
input()
Reads a line typed by the user and always returns it as a string.
name = input('Your name? ')
Type conversion
Change a value's type with int(), float() or str().
age = int(input('Age? ')) turns the typed text into a whole number.
Arithmetic operators
Comparison operators
== equal, != not equal, < less than, > greater than, <= and >=. Each comparison gives True or False.
if, elif, else
Run code only when a condition is True.
if score >= 50:
print('Pass')
else:
print('Try again')
Indentation
Python uses indentation (usually four spaces) to show which lines belong to a block, such as the body of an if, loop or function. Wrong indentation causes an IndentationError.
for loop
Repeats code for each item in a sequence.
for i in range(3):
print(i)
prints 0, 1 and 2.
range()
Produces a sequence of numbers. range(5) gives 0 to 4; range(2, 6) gives 2 to 5; range(0, 10, 2) gives even numbers 0 to 8.
while loop
Repeats code as long as a condition stays True. Make sure the condition eventually becomes False, or the loop never ends.
List
An ordered, changeable collection in square brackets.
fruits = ['apple', 'pear']
fruits.append('plum') adds an item.
Indexing
Items are numbered from 0. fruits[0] is the first item and fruits[-1] is the last.
len()
Returns the number of items in a list or characters in a string.
len('cards') is 5.
Dictionary
Stores key and value pairs in curly braces.
ages = {'Ana': 15, 'Ben': 16}
ages['Ana'] gives 15.
Tuple
An ordered collection in round brackets that cannot be changed after it is created.
point = (3, 4)
Defining a function
Use def, a name, brackets for parameters and a colon.
def greet(name):
return 'Hi ' + name
return
Sends a value back from a function to the code that called it. A function with no return gives None.
f-string
A string with an f before the quote that inserts values inside curly braces.
f'You scored {score} points'
try and except
Handles errors without crashing.
try:
n = int(text)
except ValueError:
print('Not a number')
Comment
A note for humans that Python ignores. It starts with #.
# work out the total
This deck covers the Python basics you need in the first weeks of a programming course: variables, data types, input and output, decisions, loops, lists, dictionaries, functions and simple error handling. It suits school computing students, university beginners and self-taught learners. Code examples are kept short so they fit on a card; indentation is shown with spaces. Use Learn mode to read each example, then type it into a Python editor and run it. Switch to Test mode and let spaced repetition keep the syntax fresh. Print double-sided for a desk reference while you code.
Updated October 28, 2026