Programming Fundamentals Flashcards
What is a data type?
The kind of values that can be used in a data item
What are some examples of data types?
Integer, float/real, character, string, Boolean
What are arithmetic operators?
A symbol that will perform an operation on numbers
What are the arithmetic operators?
+, -, *, /, ^, MOD, DIV
What is ^
Exponent (power of)
What data type is the variable ‘numberOfStudents’
Integer
What data type is the variable ‘circleArea’
Real/Floating point number
What data type is the variable ‘found’
Boolean
What data type is the variable ‘answer’
Character
What data type is the variable ‘studentName’
String
What type of data is a char
A single ASCII character such as A, b, 3, ! or space
What type of data is a string
Zero or more characters
What can you define other than variables
Constants
What are some examples of constants
const PI = 3.14157926535
const VAT = 0.2
const MAX_PLAYERS = 6
What is snake case
Words that are separated with an underscore, e.g. MIN_AGE