1/27
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Data Type
The Classification of a piece of data
Integer
A whole number (Positive or Negative)
Real (Float)
A number with a decimal point
Add
+
Multiplication
*
What are the basic arithmetic operators?
+ (Add), - (Subtract), * (Multiply), / (Divide)
What does the ^ symbol represent in arithmetic?
Exponent (To the Power Of)
What does MOD represent in arithmetic?
Modulo Division (Remainder)
What does DIV represent in arithmetic?
Integer Division
Divide (Python)
/
MOD
Returns the remainder e.g. 9 MOD 4 returns 1, as that is what is left.
character
A single alphanumeric character
String
A sequence of characters
Boolean
A single value of either TRUE or FALSE
Iteration
repetition - When something loops
Greater than
When a number is larger than the other number. Example 65 > 56
less than
Less than is used to compare two numbers when the first number is smaller than the second number.
Example 14<65
Variable (Programming)
Used to store information in our program
Selection (Programming)
Allows the computer to make a selection between alternative conditions; decisions choice, if/else
loop/iteration
FOR and WHILE can be used for iteration (repeating a series of instructions)
Variable example (String)
name = input("Enter name")
Variable example (Integer)
age = int(Input("Enter age"))
While Loop Python Example
count = 1
while count <= 5:
print(count)
count += 1
Casting (Programming)
Casting in Python is the process of converting a variable from one data type to another.
Example - num = int(input(“Enter number”))
Binary Search
When a list of items (IN ORDER) is searched by going to the middle value and deciding which half to search next.
Binary Search
Best used on large lists as it halves the number of items to search each time. It is an efficient algorithm for finding an item from a sorted list by repeatedly dividing the search interval in half.
Variable (programming)
A storage location identified by a name used to hold data that can be changed during program execution.
Python Scenario Revision Example - Train Ticket (You can use AI to help you here or any other method)
A Train sells tickets at £5 each.
People get a £2 discount if the price is a certain amount.
1) Ask the user how many tickets they want to buy and store this.
2) Calculate the total cost of the tickets and store this.
3) If the total cost is more than £30
4) Take of £2 discount from the cost.
5) If not above £ 30, no discount is applied.
6) Display the final amount to pay, with a message.
7) Code commented - Title, Name, Date