Instant Download: Upon successful payment, Our systems will automatically send the product you have purchased to your mailbox by email. (If not received within 12 hours, please contact us. Note: don't forget to check your spam.)
Instant Download Microsoft : 98-381 Questions & Answers as PDF & Test Engine
- Exam Code: 98-381
- Exam Name: Introduction to Programming Using Python
- Updated: Oct 21, 2026
- No. of Questions: 42 Questions and Answers
- Download Limit: Unlimited
Some teams talk about dedication; at Lead2Passed the support staff stay at their posts around the clock, checking every incoming message immediately so no 98-381 question waits its turn.
Microsoft 98-381 Exam Syllabus Topics:
| Section | Weight | Objectives |
|---|---|---|
| Topic 1: Control Flow with Decisions and Loops | 25-30% | - Apply compound conditions and logical expressions - Construct loops: for, while, nested loops - Implement conditional statements: if, elif, else - Use control keywords: break, continue, pass |
| Topic 2: Document and Structure Code | 15-20% | - Follow Python naming conventions and style guidelines - Structure code using functions and parameters - Organize code into logical blocks - Write comments and docstrings |
| Topic 3: Perform Input and Output Operations | 20-25% | - Read input from console and command line - Open, read, write, append, and close files - Format and display output - Handle file paths and file existence checks |
| Topic 4: Perform Troubleshooting and Error Handling | 5-10% | - Implement try/except/finally blocks - Raise and handle exceptions appropriately - Debug and trace code execution - Identify syntax, runtime, and logical errors |
| Topic 5: Perform Operations using Data Types and Operators | 20-25% | - Evaluate expressions and operator precedence - Apply arithmetic, comparison, logical, and assignment operators - Recognize and use data types: str, int, float, bool - Perform type conversion and data structure operations |
| Topic 6: Perform Operations Using Modules and Tools | 1-5% | - Access module attributes and functions - Solve problems using standard library tools - Import and use built-in modules: math, datetime, random, sys, os |
Your 98-381 Questions, Answered Around the Clock
- Perform Input and Output Operations (20-25%)
- Perform Troubleshooting and Error Handling (5-10%)
- Perform Operations using Data Types and Operators (20-25%)
Microsoft Introduction to Programming Using Python Sample Questions:
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.
Correct Answer:

References:
https://www.w3resource.com/python/python-for-loop.php
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.
Correct Answer:

References:
https://www.w3resource.com/python/python-data-type.php
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.
Correct Answer:

References:
https://www.w3resource.com/python/python-if-else-statements.php
You are creating a function that manipulates a number. The function has the following requirements:
A float is passed into the function
The function must take the absolute value of the float
Any decimal points after the integer must be removed
Which two math functions should you use? Each correct answer is part of the solution? (Choose two.)
- A. math.fabs(x)
- B. math.floor(x)
- C. math.frexp(x)
- D. math.ceil(x)
- E. math.fmod(x)
Correct Answer: A,D 🗳️
Explanation: Only visible for Lead2Passed members. You can sign-up / login (it's free).
You are creating a function that reads a data file and prints each line of the file.
You write the following code. Line numbers are included for reference only.
The code attempts to read the file even if the file does not exist.
You need to correct the code.
Which three lines have indentation problems? Each correct answer presents part of the solution.
(Choose three.)
- A. Line 03
- B. Line 06
- C. Line 02
- D. Line 08
- E. Line 01
- F. Line 07
- G. Line 04
- H. Line 05
Correct Answer: B 🗳️
Explanation: Only visible for Lead2Passed members. You can sign-up / login (it's free).
Viewing page 1 out of 9 pages.
Viewing questions 1-5 out of 42 questions.
100% Money Back Guarantee
Lead2Passed has an unprecedented 99.6% first time pass rate among our customers.
We're so confident of our products that we provide no hassle product exchange.
- Best exam practice material
- Three formats are optional
- 10 years of excellence
- 365 Days Free Updates
- Learn anywhere, anytime
- 100% Safe shopping experience
Over 52369+ Satisfied Customers

1063 Customer ReviewsCustomers Feedback (* Some similar or old comments have been hidden.)
Can not believe most test questions are coming from this practice file. It is very useful and helps me get a high score. Can not believe! It saves me a lot of time and mondy. Good value for money!
Latest dumps for Microsoft 98-381 certification at Lead2Passed. Great study material in the pdf files. Suggested to all.
I passed the 98-381 exam, the 98-381 exam dumps from Lead2Passed have more valid content than the other websites after comparation brfore i purchased them. Thanks!
So easy to pass my 98-381 exam.
Thank you, Lead2Passed team! I did pass my 98-381 exam. I passed with 98-381 study guide.
Passed exam with 96% new questions.dumps valid
Thank you for the great 98-381 questions.
The knowledge contained in this 98-381 training dump is complete and easy to learn. I feel grateful to buy it. Nice purchase!
Lead2Passed has made the 98-381 exam very easy with its exam practise software. I passed my exam with an excellent score.
The 98-381 Dumb is valid 100%.100% accurate and professional!
I strongly recommend it to all students Thank you for the help.
However, some answers of 98-381 are perfect dump.
I get raise after passing 98-381 exam. what a coincidence! This certification is very important for my company. Thank you for your help!
I like that i can practice the 98-381 Q&A before the real exam. I chosen the Software version and passed the 98-381 exam just in one go! Wonderful!
I never knew I could find such help online! I needed the latest information on the 98-381 exam.
The 98-381 practice questions really helped me a lot. Thanks for your help and I have passed my exam. Thanks again!
