Year 8 2024 Flashcards
Name 5 types of computers.
iPad, smart phone, desktop, laptop, mainframe.
What is programming/coding?
A process for telling a computer which tasks to perform in order to solve problems.
What are 5 examples of programming languages?
Python, Ruby, JavaScript, C, C++.
What are the characteristics of a good programmer?
Passionate, patient, positive, collaborative.
What will happen when simple block based computer programmes are executed?
Once the program begins execution it is entirely copied to the RAM.
How do you complete or modify block based programs?
Block-based coding works by dragging together ‘blocks’ of code to make programs that can do things.
What is a variable?
The value that changes in a programme, eg. The score or the timer.
What are sequences?
A series of coded instructions that tell the computer what to do.
What are iteration (loops) ?
A loop is a sequence of instructions that is repeated for a specified number of times or until a particular outcome is reached.
What are selections (if-else statements) ?
A conditional statement that runs a different set of statements depending on whether an expression is true or false.
What are events?
Events are things that happen in the system you are programming.
How do you write code to output a message in Python?
print(“hello world”)
How do you declare a variable and assign a value to it?
The assignment operator, denoted by the “=” symbol, is the operator that is used to assign values to variables in Python: x=1.
How do you get input from a user and store it in a variable?
You use the input() function to ask the user for input.
How do you combine the value stored in a variable within a sentence and output it?
By using the plus (“+”) operator. You can combine both string variables and string literals using the “+” operator.
How do you use casting to get integers from the user and do basic arithmetic with them?
Casting in python is therefore done using constructor functions: int()
How do you use if-else statements to tell python to check for a condition and present 2 alternatives depending on the result?
The if else statement essentially says: “ if this condition is True do the following thing, else do this thing instead”.
How do you do arithmatic operations to do calculations in Python?
You use the built-in mathematical operators, such as addition ( + ), subtraction ( - ), division ( / ), and multiplication ( * ).
How do you use operators to compare data in python?
The six comparison operators are 1) == or equal to, 2) != or not equal to, 3) > or greater than, 4) >= or greater than or equal to, 5) < or less than, and 6) <= or less than or equal to.
What are the 3 types of errors?
Syntax - incorrect grammar in the program.
Runtime - when the programme is asked to do something it cannot perform.
Logic - an error in the meaning of the code.