Introduction to Programming Using Python

Here you have the best Microsoft 98-381 practice exam questions

  • Preview the first 5 of 40 questions for free
  • These questions were last updated on April 28, 2026
  • This site is not affiliated with or endorsed by Microsoft.
Question 1 of 40

HOTSPOT -

You are writing a Python program to validate employee numbers.

The employee number must have the format ddd-dd-dddd and consist only of numbers and dashes. The program must print True if the format is correct and print if the format is incorrect.

False -

How should you complete the code? To answer, select the appropriate code segments in the answer area.

Hot Area:

Exam 98-381: Question 1 - Image 1
Answer

Suggested Answer

Exam 98-381: Question 1 - Image 2
Question 2 of 40

HOTSPOT -

You are coding a math utility by using Python.

You are writing a function to compute roots.

The function must meet the following requirements:

Exam 98-381: Question 2 - Image 1

How should you complete the code? To answer, select the appropriate code segments in the answer area.

Hot Area:

Exam 98-381: Question 2 - Image 2
Answer

Suggested Answer

References: https://www.w3resource.com/python/python-if-else-statements.php Exam 98-381: Question 2 - Image 3
Question 3 of 40

HOTSPOT -

You work for a company that distributes media for all ages.

You are writing a function that assigns a rating based on a user's age. The function must meet the following requirements:

  • Anyone 18 years old or older receives a rating of "A"
  • Anyone 13 or older, but younger than 18, receives a rating of "T"
  • Anyone 12 years old or younger receives a rating of "C"
  • If the age is unknown, the rating is set to "C"

You need to complete the code to meet the requirements.

Hot Area:

Exam 98-381: Question 3 - Image 1
Answer

Suggested Answer

References: https://www.w3resource.com/python/python-if-else-statements.php Exam 98-381: Question 3 - Image 2
Question 4 of 40

HOTSPOT -

You are designing a decision structure to convert a student's numeric grade to a letter grade. The program must assign a letter grade as specified in the following table:

Exam 98-381: Question 4 - Image 1

For example, if the user enters a 90, the output should be, "Your letter grade is A". Likewise, if a user enters an 89, the output should be "Your letter grade is B".

How should you complete the code? To answer, select the appropriate code segments in the answer area.

Hot Area:

Exam 98-381: Question 4 - Image 2
Answer

Suggested Answer

References: https://www.w3resource.com/python/python-if-else-statements.php Exam 98-381: Question 4 - Image 3
Question 5 of 40

You are developing a Python application for an online product distribution company.

You need the program to iterate through a list of products and escape when a target product ID is found.

How should you complete the code? To answer, select the appropriate code segments in the answer area.

NOTE: Each correct selection is worth one point.

Hot Area:

Exam 98-381: Question 5 - Image 1

35 more questions await

Unlock the full Microsoft 98-381 question bank

5 of 40 completed13%

Choose your plan

One-time payment · No subscription · No hidden fees

Standard

Quick preparation

$25

30 days access

30 day access to all questions
Instant free updates
Highest passing rate in industry
Printable PDF download
No money-back guarantee
Best Value

Premium

Guaranteed success

$60$35

90 days access

PDF

Printable PDF download

New

Save every question as a PDF for offline study or printing.

90 day access to all questions
Instant free updates
Highest passing rate in industry
Pass guaranteed or money back

100% Money-Back Guarantee

Don't pass? Full refund.

4.9/5

Based on 4,412+ reviews

Trusted by thousands of professionals

Join certified professionals who passed their exams with Examice

Examice helped me pass my AWS certification on the first try! The questions were incredibly similar to the real exam. Comments helped me understand answers I was struggling with.
S
Sarah C.
Cloud Engineer
Great results in a short prep time. Passed on my first attempt.
D
David K.
Network Engineer
I needed to pass an exam for work, and this website delivered. The quality for the price is outstanding, and the support is really good. I passed without issues.
M
Michael R.
Security Analyst
Skeptical at first, but impressed. Every question included clear, detailed explanations.
L
Lisa M.
Solutions Architect
The guarantee gave me confidence to invest in the premium package. Turns out I didn't need it. Passed comfortably. The explanations for each answer were incredibly detailed and helped me grasp security concepts that I'd been struggling with for months.
R
Robert H.
Cybersecurity Consultant
Used Examice for my PMP certification. The questions were well structured and covered all exam domains thoroughly.
J
James T.
IT Manager
After failing my first attempt with other study materials, I switched to Examice and passed confidently on my second attempt.
A
Anna W.
Data Engineer
The premium package was worth it. 90 days of access gave me the flexibility to study when it worked for me, without feeling rushed.
E
Emily J.
DevOps Engineer
Straightforward questions that matched the real exam perfectly. Studied for two weeks and passed with a great score.
K
Karen P.
Systems Administrator

Frequently Asked Questions

Everything you need to know. Contact us for more.

Our Microsoft 98-381 questions are based on real exam experiences and are continuously updated to match the current exam format. We maintain a +99% pass rate because our questions closely mirror what you'll see on the actual exam.

With our Premium package, you get a 100% money-back guarantee. If you don't pass your exam after studying with our materials, simply contact us with your exam results and we'll refund your purchase. Terms and conditions apply, read our full refund policy to learn more.

Our question bank is updated regularly based on feedback from recent exam takers. We typically review and update our content every week with reports about new questions or changes to the exam format.

Standard package access cannot be extended. However, Premium package gives you 90 days which is typically more than enough time to prepare thoroughly. If you need additional time, you can purchase a new package at any time.

This is a one-time payment with no recurring charges. Once you purchase, you get full access to all exam questions for the duration of your package (30 days for Standard, 90 days for Premium). No hidden fees or automatic renewals.

Pass on your first try

All 40questions · Detailed explanations · Printable PDF · 90 days access

Money-back guaranteeSecure checkout
$35

one-time payment