|Exam Name||:||Introduction to Programming Using Python|
|Questions and Answers||:||40 Q & A|
|Updated On||:||Click to Check Update|
|PDF Download Mirror||:||98-381 Brain Dump|
|Get Full Version||:||Pass4sure 98-381 Full Version|
You are creating a Python program that shows a congratulation message to employees on their service anniversary. You need to calculate the number of years of service and print a congratulatory message. You have written the following code. Line numbers are included for reference only.
You need to complete the program. Which code should you use at line 03?
print(“Congratulations on” + (int(end)-int(start)) + “years of service!”
print(“Congratulations on” + str(int(end)-int(start)) + “years of service!”
print(“Congratulations on” + int(end - start) + “years of service!”
print(“Congratulations on” + str(end - start)) + “years of service!”
Evaluate the following Python arithmetic expression:
What is the result?
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.
You are writing a Python program that evaluates an arithmetic formula.
The formula is described as b equals a multiplied by negative one, then raised to the second power, where a is the value that will be input and b is the result.
You create the following code segment. Line numbers are included for reference only.
You need to ensure that the result is correct. How should you complete the code on line 02? To answer, drag the appropriate code segment to the correct location. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.
b = (-a)**2