Why do programmers use the Turtle Graphics Module in Python?
To assign a value to a variable
To draw on the screen or create images
To evaluate mathematical statements
To print strings and string literals
When writing a for loop in Python, programmers assign a numeric range to tell the loop where to start, how many times to repeat, and when to stop.
Read the following code used to calculate the total cost of a meal with a 20% tip:
mealCost = input(“What is the meal total?”)
tip = mealCost * 0.20
totalCost = meal + tip
There is an error in the code. Which additional function needs to be used with the input() function?
Which of the following is an example of a runtime error in programming?
Not using quotation marks and parentheses to print a string literal
Printing an inaccurate fact, like print(“Dogs have wings.”)
Trying to perform an impossible task, like 5 / 0
Using camelcase when a variable name contains two or more words
Low-level programming languages are written in machine code, which is a set of instructions composed of 1s and 0s that computers can execute without translation.
What is one way interpreted programming languages differ from compiled programming languages?
Interpreted languages produce translated machine code that can be saved and run later, while compiled languages cannot be saved.
Interpreted languages translate all lines of code together and execute them all at once, while compiled languages translate one line of code at a time and then execute that line before moving on.
Programs written with interpreted languages are ready to be run, but programs written with compiled languages require interpreter software to be run.
Programs written with interpreted languages tend to run more slowly than programs of compiled languages.
How are the waterfall and agile methods of software development similar?
Both methods allow project teams to complete small portions of the entire project in small sprints and work on different steps simultaneously.
Both methods focus on development rather than planning, in order for project teams to work more quickly.
Both methods have project teams work on one step at a time and move on when the previous step is completed and approved.
Both methods require documentation so project teams stay on track and keep control over what version of the project they are working on.
In Python, an equal symbol (=) is used to concatenate two or more strings.
What is the purpose of Python’s Math Module?
Automatically solve math equations
Correct logic errors in mathematical code
Provide programmers with pre-built math functions
Teach complex math calculations to students
Which of the following numeric values is considered a floating point number?