Microsoft 98-381 Exam Practice Questions (P. 3)
- Full Access (40 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #11
HOTSPOT -
During school holidays, you volunteer to explain some basic programming concepts to younger siblings.
You want to introduce the concept of data types in Python. You create the following three code segments:

You need to evaluate the code segments.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:

During school holidays, you volunteer to explain some basic programming concepts to younger siblings.
You want to introduce the concept of data types in Python. You create the following three code segments:

You need to evaluate the code segments.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:

Correct Answer:
✑ Code Segment 1: You cannot convert str to int. x1 = "2" is a string. Therefore code will produce an error.
✑ Code Segment 2: b = 1.5, which is a float.
✑ Code Segment 3: c = 2.5, which is a float, not an int.
References: https://www.w3resource.com/python/python-data-type.php

✑ Code Segment 1: You cannot convert str to int. x1 = "2" is a string. Therefore code will produce an error.
✑ Code Segment 2: b = 1.5, which is a float.
✑ Code Segment 3: c = 2.5, which is a float, not an int.
References: https://www.w3resource.com/python/python-data-type.php
send
light_mode
delete
Question #12
DRAG DROP -
Match the data type to the type operations.
To answer, drag the appropriate data type to the correct type operation. Each data type may be used once, more than once, or not at all.
Select and Place:

Match the data type to the type operations.
To answer, drag the appropriate data type to the correct type operation. Each data type may be used once, more than once, or not at all.
Select and Place:

send
light_mode
delete
Question #13
HOTSPOT -
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.
NOTE: Each correct selection is worth one point.

Hot Area:

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.
NOTE: Each correct selection is worth one point.

Hot Area:

send
light_mode
delete
Question #14
HOTSPOT -
The ABC Video company needs a way to determine the cost that a customer will pay for renting a DVD. The cost is dependent on the time of day the DVD is returned. However, there are also special rates on Thursdays and Sundays. The fee structure is shown in the following list:
✑ The cost is $1.59 per night.
✑ If the DVD is returned after 8 PM, the customer will be charged an extra day.
✑ If the video is rented on a Sunday, the customer gets 30% off for as long as they keep the video.
✑ If the video is rented on a Thursday, the customer gets 50% off for as long as they keep the video.
You need to write code to meet the requirements.
How should you complete the code? To answer, select the appropriate code segments in the answer area.

Hot Area:

The ABC Video company needs a way to determine the cost that a customer will pay for renting a DVD. The cost is dependent on the time of day the DVD is returned. However, there are also special rates on Thursdays and Sundays. The fee structure is shown in the following list:
✑ The cost is $1.59 per night.
✑ If the DVD is returned after 8 PM, the customer will be charged an extra day.
✑ If the video is rented on a Sunday, the customer gets 30% off for as long as they keep the video.
✑ If the video is rented on a Thursday, the customer gets 50% off for as long as they keep the video.
You need to write code to meet the requirements.
How should you complete the code? To answer, select the appropriate code segments in the answer area.

Hot Area:

Correct Answer:
References:
https://www.w3resource.com/python/python-operators.php
https://www.w3resource.com/python/python-if-else-statements.php

References:
https://www.w3resource.com/python/python-operators.php
https://www.w3resource.com/python/python-if-else-statements.php
send
light_mode
delete
Question #15
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.
Select and Place:

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.
Select and Place:

Correct Answer:
References: http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html

References: http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html
send
light_mode
delete
All Pages