Microsoft 98-381 - Introduction to Programming Using Python Exam
Page: 3 / 8
Total 40 questions
Question #11 (Topic: Topic 1)
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:
[Microsoft-98-381-1.0/xmlfile-33_1.jpg]
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:
[Microsoft-98-381-1.0/xmlfile-34_1.jpg]
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:
[Microsoft-98-381-1.0/xmlfile-33_1.jpg]
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:
[Microsoft-98-381-1.0/xmlfile-34_1.jpg]
Answer: [Microsoft-98-381-1.0/xmlfile-35_1.jpg]
Question #12 (Topic: Topic 1)
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:
[Microsoft-98-381-1.0/xmlfile-36_1.jpg]
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:
[Microsoft-98-381-1.0/xmlfile-36_1.jpg]
Answer: [Microsoft-98-381-1.0/xmlfile-37_1.jpg]
Question #13 (Topic: Topic 1)
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.
[Microsoft-98-381-1.0/xmlfile-38_1.png]
Hot Area:
[Microsoft-98-381-1.0/xmlfile-39_1.png]
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.
[Microsoft-98-381-1.0/xmlfile-38_1.png]
Hot Area:
[Microsoft-98-381-1.0/xmlfile-39_1.png]
Answer: [Microsoft-98-381-1.0/xmlfile-41_1.png]
Question #14 (Topic: Topic 1)
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.
[Microsoft-98-381-1.0/xmlfile-43_1.jpg]
Hot Area:
[Microsoft-98-381-1.0/xmlfile-45_1.jpg]
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.
[Microsoft-98-381-1.0/xmlfile-43_1.jpg]
Hot Area:
[Microsoft-98-381-1.0/xmlfile-45_1.jpg]
Answer: [Microsoft-98-381-1.0/xmlfile-47_1.jpg]
Question #15 (Topic: Topic 1)
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:
[Microsoft-98-381-1.0/xmlfile-49_1.jpg]
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:
[Microsoft-98-381-1.0/xmlfile-49_1.jpg]
Answer: [Microsoft-98-381-1.0/xmlfile-50_1.jpg]