Describe the data type 'Integer' and provide an example value. - Answers A whole number. 3, -170,
17600
Describe the data type 'Real/Float' and provide an example value. - Answers A number with a decimal
point. 3.142, 8.0, -0.567
Describe the data type 'Char' and provide an example value. - Answers A single character or symbol that
can be typed. A, #, %, 5
Describe the data type 'String' and provide an example value. - Answers Zero or more characters
grouped together. "Yes", "hi", "John"
Describe the data type 'Boolean' and provide an example value. - Answers Can only take the value True
or False. 'True'
Describe what is meant by a variable in programming. - Answers A variable is a memory location holding
a data item which may change value during program execution.
Describe what is meant by a constant in programming. - Answers A constant is a memory location
holding a data item which can not change during program execution.
What are the advantages to a programmer using a naming convention for their variables? - Answers It
can help reduce errors when writing a variable name as it provides guidance on when a capital letter or
an underscore should be used. This can help a programmer remember whether the variable they are
trying to use was total_sorted, Total_Sorted, TotalSorted, totalSorted, totalsorted or any other
combination. This can also help produce consistent code when working as part of a larger team.
What symbol is used in Python for variable assignment? - Answers "="
Describe what is meant by casting in programming? - Answers The process of converting from one
datatype to another.
Describe what the following code would do - STRING_TO_REAL(StringExp) - Answers The code would
convert a variable from the string data type to the real datatype.
Describe what the following code would do - str(x) - Answers The code would convert a variable from
the integer data type to the string datatype.
In python, all input data is automatically stored as which data type? - Answers String.
What does the arithmetic operator "+" do in python? - Answers Addition.
What does the arithmetic operator "-" do in python? - Answers Subtraction.