Computing Studies Flashcards
(25 cards)
Comments
anything on the line after a # is considered as comment
identifiers
Any sequence of letter, digits and underscores, starting with a letter. Both uppercase and lowercase are case are supported
Integer
A whole number
(ALU)
Arithmetic logic unit
Data type
A set of possible values
String
Words or Text
Common Arithmetic Operators
+=addition, -=subtraction, *=multiplication,/=division,**=squared, //=div, %=mod
Boolean Operators
And, or , not
How to loop
for in range
Common comparison operators
Equals to ==, not equals to !=, less than <, greater than >, less than or equals to <=, more than or equals to >=
Inputs and output
Print and input
Selection
if statement
if/elif/else
Subprograms
Functions, procedures, parameters
Values
Variable, constants, assignment
Types of data types
String, integer, float, Boolean, char, casting
Data structure
list/array, indexes
String formats
width
precision
type
alignment
Programming construct
-iteration
-loops
-for
.count controlled
.fixed number of times
-while
.condition controlled
.indeterminate number of times
number [] = ?
Variable
Float=?
Fractional number
Boolean=?
Logical true or false
Character=?
a string with a length of 1
Array=?
A linear data structure
Subprogram=?
A block of code given a unique identifiable name within a program