This quiz covers new and old topics all chapters that have been covered. You will have 30 minutes to complete 5 questions. <strong>Please DO NOT exit the window as you will not be able to restart!</strong> Your quiz window and IP Address are tracked….just as an FYI.
You must specify a text.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 10 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Categories
Not categorized0%
Quiz completed. You may now close the window.
1
2
3
4
5
6
7
8
9
10
Answered
Review
Question 1 of 10
1. Question
The ABC company needs a way to find the count of particular letters in their publications to ensure that there is a good balance. It seems that there have been complaints about overuse of the letter e. You need to create a function to meet the requirements. How should you complete this code? To answer, select the appropriate code segments in the answer area.
Correct
Incorrect
Question 2 of 10
2. Question
The ABC company is converting an existing application to Python. You are creating documentation that will be used by several interns who are working on the team. You need to ensure that arithmetic expressions are coded correctly.
What is the correct order of operations for the six classes of operations ordered from first to last in order of evaluation? To answer, move all order the operations into the correct order.
Parenthesis
Exponents
Multiplication
Division
Addition
Subtraction
Correct
PEMDAS — Please Excuse My Dear Aunt Sally.
In coding, remember PEUMDASA
Parenthesis
Exponents
Unary positive, negative, not
Multiplication and Division
Addition and Subtraction
And
Incorrect
PEMDAS — Please Excuse My Dear Aunt Sally.
In coding, remember PEUMDASA
Parenthesis
Exponents
Unary positive, negative, not
Multiplication and Division
Addition and Subtraction
And
Question 3 of 10
3. Question
You need to ensure that the program handles the data correctly so that it can be stored in the database correctly. Match the data type to the code segment. To answer, drag the appropriate data type from the column on the left to its code segment on the right. Each data type may be used once, more than once, or not at all.
Sort elements
age = 2
minor = False
name = "Miles Morales"
weight = 123.5
zip = "81000"
int
bool
str
float
str
Correct
Incorrect
Question 4 of 10
4. Question
You are creating a Python program that shows a congratulation message to employees on their service anniversary. You need to calculate the number of years of service and print a congratulatory message. You have written the following code. Line numbers are included for reference only.
You need to complete the program.
Which code should you use at line 03?
Correct
Incorrect
Question 5 of 10
5. Question
Evaluate the following Python arithmetic expression:
(3*(1+2)**2 – (2**2)*3)
Correct
Incorrect
Hint
** = exponent
Question 6 of 10
6. Question
You are writing an application that uses the sqrt function. The program must reference the function using the name squareRoot.
You need to import the function.
Which code segment should you use?
Correct
Incorrect
Question 7 of 10
7. Question
You develop a Python application for your company. A list named employees contains 200 employee names, the last five being company management. You need to slice the list to display all employees excluding management. Which two code segments should you use? Each correct answer presents a complete solution. (Choose two.)
Correct
Incorrect
Question 8 of 10
8. Question
You write the following code:
In which order should you arrange the code segments to complete the function? To answer, rearrange the code segments in the correct order.
with open(filename, "r") as file:
if os.path.isfile(filename):
return file.readline()
else:
<p style="margin-left: 10px">return None</p>
Correct
Incorrect
Question 9 of 10
9. Question
You develop a Python application for your company. You need to accept input from the user and print that information to the user screen. You have started with the following code. Line numbers are included for reference only.
Correct
Incorrect
Question 10 of 10
10. Question
You develop a Python application for your school.
You need to read and write data to a text file. If the file does not exist, it must be created. If the file has content, the content must be removed.
Which code should you use?