Unit:8 Pseudocode and Python Flashcards
In pseudo code how do u assign a variable?
Colour <— “red”
In python how do u assign a variable?
Colour = “red”
In pseudo code how do u output/input?
INPUT Colour
OUTPUT “The colour is “, Colour
In python how do u output/input?
Colour = input( )
Print (“The colour is”, colour)
In pseudo code how do u declare constants?
CONSTANT Colour <— “yellow”
In python how do u declare constants?
Colour_const. = “yellow”
In pseudo code what is the data type for text ?
Text or alphanumeric
In python what is the data type for text ?
String
In pseudo code what is the data type for whole numbers?
Integer
In python what is the data type for whole numbers?
Integer
In pseudo code what is the data type for a decimal?
Real
In python what is the data type for a decimal?
Float
In pseudo code what is the data type for true or false?
Boolean
In python what is the data type for true or false?
Boolean
How do you add numbers?
10 + 5