A type of programming language that is processed line-by-line at runtime rather than being compiled.
What is an interpreted language
This is the data type that the input() function always returns, regardless of what the user enters.
What is a string?
The term for variable number in the python call quadruple(number)
What is a parameter?
The theoretical term for a type of loop is used when you want to repeat code a specific number of times.
What is a counted loop
The output of print(2 * 5 // 3 + 9 % 4 / 2)
What is 3.5
A fundamental aspect of a computer language that defines its grammar and structure.
What is syntax?
This is the result type when you add an integer and a float in Python, such as 8 + 2.0.
What is a float?
A Python function that converts floats into mathematically closest integers.
What is round()?
This function generates a sequence of numbers and is commonly used with for loops
what is range()
The result of round(8.45, 1)
What is 8.4
A fundamental aspect of a computer language that defines the meaning or effect of the code.
What is semantics?
This Python technique allows you to assign values to multiple variables in a single statement, like x, y =input("Enter item count and price: ")
What is multiple (or simultaneous) assignment?
The term for a variable used to build up a result by repeatedly adding or combining values, usually inside a loop.
What is an accumulator?
This is the set of values loop index variable will take on as a result of for i in range(4)...
(what are 0,1,2,3)
The result of int(“3.14”)
What is ValueError?
The process of describing exactly what the program will do, and what are the limits and edge cases to verify.
What is 'determining specifications'?
From the following list of names: number5, ICan’tHelp, Hello?, STOP, run2you, 3vita, and __funny_girl__, these are valid Python variable names.
What are number5, STOP, run2you, __funny_girl__
This must be done before you can use code that someone else wrote, such as the sqrt() function.
What is import a library?
This parameter in the print function allows you to control what character appears after the printed value instead of a newline.
What is "end = "
The output of the following code, if the pirate enters ‘3’:
treasure = 300
max_crew = int(input("Enter maximum crew size: "))
print("Loot based on crew size:")
for crew_size in range(max_crew):
share = treasure / crew_size
print("With", crew_size, "pirates: ", share, "each")
What is divide by 0 error
Python's ability to determine variable type at runtime.
What is dynamic typing?
This is a major disadvantage of using floating-point numbers in programming.
What is that they are usually only approximations (or cannot represent all real numbers precisely)?
This is the reason list(range(30, 3)) produces an empty list rather than all multiples of 3 under 30.
This is the content of salad after running this loop:
fruit = [“pear”, “plum”]
salad = “”
for word in fruit:
salad += word*3 + " "
what is pearpearpear plumplumplum
The purpose of the following code:
data = [7, 3, 11, 2, 8]
current = data[0]
for item in data:
if item < current:
current = item
print(current)
what is find min