Term 3 Binary and Python Flashcards
How many values does binary have?
2
What number does 0 0 0 1 0 1 0 1 represent in 8 bit binary?
21
What number does 0 0 0 1 0 1 0 0 represent in 8 bit binary?
20
What number does 0 0 0 1 0 0 1 1 represent in 8 bit binary?
19
How would the number 33 be represented in 8 bit binary?
0 0 1 0 0 0 0 1
How would the number 99 be represented in 8 bit binary?
0 1 1 0 0 0 1 1
What is pseudocode?
A method of writing up a set of instructions for a computer program using plain English. This is a good way of planning a program before coding.
What is a program?
A sequence of instructions for a computer.
What is a programming language?
A language used by a programmer to write a piece of software e.g. Python
What is programming?
The process of writing computer software.
What word means “the set of rules that define the combinations of symbols that are considered to be correctly structured programs in that language”?
Syntax
What would happen if you wrote the following program using python:
print (“Hello, World)
An error message would be displayed as a quote mark is missing
Which word best fits this description “In a computer program, this is a memory location where values are stored.”?
Variable
What would happen if you wrote the following program using python:
print (“2” + “2”)
22 would be displayed on the screen (the values shown are strings not integer values so + puts the two together and doesn’t add them up)
Which data type represents numbers containing a decimal point?
Float
Which data type represents whole numbers?
Integer
Which data type represents a list of characters in order eg. “Hello World”?
String
What would happen if you wrote the following code using Python:
print(“What is your name?”)
name = input()
print(“Hello “ + name)
The user would be asked their name, if they then input their name as Dave this would then be printed as “Hello Dave” on the screen