Microsoft Introduction to Programming Using Python - 98-381 Exam Practice Test
You are writing code that generates a random integer with a minimum value of 5 and a maximum value of 11.
Which two functions should you use? Each correct answer presents a complete solution. (Choose two.)
Which two functions should you use? Each correct answer presents a complete solution. (Choose two.)
Correct Answer: A,D
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
DRAG DROP
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 precedence? To answer, move all operations from the list of operations to the answer area and arrange them in the correct order.

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 precedence? To answer, move all operations from the list of operations to the answer area and arrange them in the correct order.

Correct Answer:

References:
http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html
Evaluate the following Python arithmetic expression:

What is the result?

What is the result?
Correct Answer: C
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
HOTSPOT
You are developing a Python application for an online game.
You need to create a function that meets the following criteria:
The function is named update_score
The function receives the current score and a value
The function adds the value to the current score
The function returns the new score
How should you complete the code? To answer, select the appropriate code segments in the answer area.

You are developing a Python application for an online game.
You need to create a function that meets the following criteria:
The function is named update_score
The function receives the current score and a value
The function adds the value to the current score
The function returns the new score
How should you complete the code? To answer, select the appropriate code segments in the answer area.

Correct Answer:

References:
https://www.w3resource.com/python/python-user-defined-functions.php
DRAG DROP
You are creating a Python script to evaluate input and check for upper and lower case.
Which four code segments should you use to develop the solution? To answer, move the appropriate code segment from the list of code segments to the answer area and arrange them in the correct order.

You are creating a Python script to evaluate input and check for upper and lower case.
Which four code segments should you use to develop the solution? To answer, move the appropriate code segment from the list of code segments to the answer area and arrange them in the correct order.

Correct Answer:

References:
https://www.w3resource.com/python/python-while-loop.php