1/49
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
where is your program stored once it starts runnning?
main memory
what steps are involved in the execution cycle of an instruction
fetch-decode-execute
what is a machine language
binary used to perform basic operations
how are negative numbers stored in the memory
stored by using two’s complement: a coding technique used to store negative numbers
ASCII
coding scheme containing set of 128 numeric codes, used to represent characters to computer memory
largest number stored in a byte
255
what is a bit
smallest unit of digital data. represents a single 0 or 1
what is a byte
collection of 8 bits
what is hardware
physical, tangible machinery of a computer like a processor or screen
what is software
intangible set of digital instructions that tells the hardware what to do
syntax error
violation of languages structural and grammatical rules, preventing the code from running at all
logic error
code runs but produces an unintended output
multiplication
*
exponent
**
addition
+
subtraction
-
floating division
/
integer division
//
float
numbers contain decimal points
int
numbers without decimals
complex
numbers with a real and imaginary part
string
sequence of characters used as data
boolean
true or false
input()
reads a line of typed text by user, returning it as a string
print()
displays text, expressions, and numbers onto screen
or operator
one or both sub expressions must be true for the entire expression to be true
and operator
both sub expressions must be true for the compound expression to be true
not operator
used to invert truth value of a expression or variable
x>y
x>y
x<y
x<y
x>=y
x>_y
x<=y
x<_Y
x==y
x=y
x!=y
x does not equal y
for loop
automatically reads lines in a file and stops when end of file is reached
while loop
loop executes a block of code as long as a specified condition remains true
if statement
evaluates a condition and executes a block of code only if that condition is True
function header
first line of code in a function. includes keyword def and function name, followed by parentheses and colon
local variables
a variable declared inside a function body or as a function parameter
global variables
a variable declared outside of any function or class block, making it accessible throughout the entire module.
argument
data that is given to the function
parameters
variable that is assigned the value of an argument when the function is called. General format: def function_name(parameter):
value returning function
Executes the statements it contains, and then it returns a value back to the statement that called it
randint function
generates random number within range provided by argument and returns it to the program that called the function
randrange function
returns randomly selected integer from the resulting sequence
random function
returns a random float in the range of 0.0 and 1.0
uniform function
returns a random float but allows user to specify range
modes
string specifying how the file will be opened
how to open file
open file with ‘r’ mode
how to write on file
write method used to write data to the file. Format: file_variable.write(string)