Zusammenfassung der Ressource
Computer science unit 2
- VARIABLES
- points to are of memory that stores data,
can be changed while program executing
- constant - value that cannot be
altered by the program during
execution
- pi = 3.14
- casting
- changing from one
variabe type to another
- int(input("Enter the price"))
- DATA TYPES
- string
- sequence of characters, can be numbers,
letters, symbols, must be in speech marks
- input("Enter your name")
- python = str()
- integer
- a whole number, positive or
negative
- 45, 324 ...
- python = int()
- boolean
- two possible values, TRUE or FALSE
- 35 > = 5 * 7
- TRUE
- 2 ^3 = 10
- FALSE
- float
- a decimal number, real value
- 3.14, 5.01 ...
- python = float()
- character
- A single alphabetic or
numeric character
- ‘K’, ‘4’, ‘@’, ‘%’
- MATH OPERATORS
- add +
- - minus
- * mulitple
- / division
- // displays whole number in
divison
- 5 // 2 = 2
- % displays remainder in
divsion
- 5 % 2 = 1
- ^ power to (indices)
- == equal to != not equal to
< more than > less than
- <= less than/equal to
>= more than/equal to
- PSEUDOCODE
- algorithm
- series of steps to solve
problem/carry out task
- structured English for
describing algorithms
- if total == 19 :
print ("You won")