
MTA 98-381 Quiz
Authored by John Khoury
Other
8th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a variable in programming?
A variable is a mathematical equation.
A variable is a type of loop in programming.
A variable is a named storage location that holds a value.
A variable is a function in programming.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the different data types in Python?
int, float, str, bool, list, tuple, dict, set, array
int, float, str, bool, list, tuple, dict, set, char
int, float, str, bool, list, tuple, dict, set
int, float, str, bool, list, tuple, dict, set, object
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of operators in programming?
Operators in programming are used to perform various operations on data.
Operators in programming are used to manipulate data.
Operators in programming are used to store data.
Operators in programming are used to display data.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for error handling in Python?
try-catch
if-else
switch-case
try-except
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between local and global variables?
Local variables are declared outside of any function or block of code, while global variables are declared within a specific function or block of code.
Local variables can be accessed from anywhere in the program, while global variables can only be accessed within a specific function or block of code.
Local variables have a wider scope than global variables, allowing them to be used in multiple functions or blocks of code.
Local variables are declared within a specific function or block of code, while global variables are declared outside of any function or block of code.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the data type of the result when adding an integer and a float in Python?
float
boolean
integer
string
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'try-except' statement in error handling?
To catch and handle exceptions
To ignore exceptions and continue execution.
To display error messages to the user.
To prevent exceptions from occurring.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?