General knowledge Flashcards
What is a string?
A string is a string or sequence of characters/ textual data
What is parenthesis?
()
What are quotes
” “
What does the function “print” do?
it displays in the terminal window whatever we’ve put between the parenthesis
What is a variable?
data that is temporarily stored in the computers memory -
Python has no command for declaring a variable. A variable is created the moment you first assign a value to it.
What is a value?
the contents of a variable
How does the programme get executed?
From top to bottom
If you want to use multiple words in a variable what are they separated by?
Using an underscore 🔸_🔸
What value does a “Boolean” hold
True/ False
What value does an “Integer” hold
a whole number
What does it mean that the language is case sensitive?
it means lowercase and uppercase characters affect the language
When creating a boolean what character must the initial letter start with
an uppercase character
What does the function “input” do?
It reads value from the terminal window
What does the “int” function do?
It can convert a value to an integer. E.G str to int
Why would an error code return if you tried to subtract a string from an integer?
Because python doesn’t know how to automatically convert values. You must convert them yourself