98-381 Practice Test Questions – Introduction to Programming Using Python

If you are searching the updated preparation material for Microsoft 98-381 Introduction to Programming Using Python exam, then stop worrying about it as you have landed at the right place. Passquestion provides you with the expertly designed 98-381 Practice Test Questions for Introduction to Programming Using Python exam. I highly recommend you to must try the free demo of product before purchase. I ensure that, your success in 98-381 certification exam is 100% guaranteed.

98-381 Practice Test Questions – Introduction to Programming Using Python

1. The ABC company is creating a program that allows customers to log the number of miles biked. The program will send messages based on how many miles the customer logs.

You create the following Python code. Line numbers are included for reference only.

You need to define the two required functions.

Which code segments should you use for line 01 and line 04? Each correct answer presents part of the solution? (Choose two.)

 
 
 
 
 
 

2. You develop a Python application for your company.

You want to add notes to your code so other team members will understand it.

What should you do?

 
 
 
 

3. This question requires that you evaluate the underlined text to determine if it is correct.

You write the following code:

The out.txt file does not exist. You run the code. The code will execute without error.

Review the underlined text. If it makes the statement correct, select “No change is needed”. If the statement is incorrect, select the answer choice that makes the statement correct.

 
 
 
 

4. 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.)

 
 
 
 
 
 
 
 

5. You develop a Python application for your school.

You need to read and write data to a text file. If the file does not exist, it must be created. If the file has content, the content must be removed.

Which code should you use?

 
 
 
 

6. You develop a Python application for your company.

You need to accept input from the user and print that information to the user screen.

You have started with the following code. Line numbers are included for reference only.

Which code should you write at line 02?

 
 
 
 

7. 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.)

 
 
 
 

8. You are writing an application that uses the sqrt function. The program must reference the function using the name squareRoot.

You need to import the function.

Which code segment should you use?

 
 
 
 

70-765 Practice Test Questions - Provisioning SQL Databases
70-767 Practice Test Questions - Implementing a SQL Data Warehouse

Leave a Reply

Your email address will not be published. Required fields are marked *