Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 9 pages
Exam (elaborations)

WGU Python OA Questions with Detailed Explanations (2026/2027)

Document preview thumbnail
Preview 2 out of 9 pages

This document contains questions and verified answers for WGU Python OA . It includes detailed explanations, revision-focused content, and exam preparation material suitable for 2026/2027 students.

Content preview

WGU Python OA

Task:
Create an answer that accepts an integer enter representing water temperature in levels
Fahrenheit. Output a description of the water country based on the following scale:
If the temperature is underneath 33° F, the water is "Frozen".
If the water is among 33° F and 80° F (including 33°), the water is "Cold".
If the water is among eighty° F and one hundred fifteen° F (along with 80°), the water is "Warm".
If the water is between 115° F and 211° F (together with 115°) , the water is "Hot".
If the water is greater than or same to 212° F, the water is "Boiling".
Additionally, output a protection remark most effective during the following circumstances:
If the water is precisely 212° F, the protection remark is, "Caution: Hot!"
If the water temperature is much less than 33° F, the protection remark is, "Watch out for ice!"
print("Enter the water temperature:")
temperature = int(input())
if temperature >= 212:
state="Boiling"
elif a hundred and fifteen <= temperature <= 211:
kingdom="Hot"
elif 80 <= temperature < a hundred and fifteen:
state="Warm"
elif 33 <= temperature < 80:
state="Cold"
else:
state="Frozen"
print(state)
if temperature >= 212:
print("Caution: Hot!")
elif temperature < 33:
print("Watch out for ice!")


Create a solution that accepts an integer input identifying what number of one of a kind shares
of stock are purchased from the Old Town Stock Exchange, followed through an equivalent wide
variety of string inputs representing the inventory alternatives.

The following dictionary, stock, lists to be had stock selections as the key and the fee per
selection as the price.

Stocks = 'TSLA': 912.86 , 'BBBY': 24.Eighty four, 'AAPL': 174.26, 'SOFI': 6.Ninety two, 'KIRK':
8.72, 'AURA': 22.12, 'AMZN': 141.28, 'EMBK': 12.29, 'LVLU': 2.33

, Output the entire value of the purchased stocks of stock to two decimal locations.

The answer output must be inside the layout:

Total charge: $cost_of_stocks

shares = 'TSLA': 912.86, 'BBBY': 24.84, 'AAPL': 174.26, 'SOFI': 6.92, 'KIRK': 8.Seventy two,
'AURA': 22.12, 'AMZN': 141.28, 'EMBK': 12.29, 'LVLU': 2.33
total = 0
print("Enter a amount of shares observed by stock symbol(s):")
num_items = int(enter())
for i in range(num_items):
item = enter()
if item in shares.Keys():
overall += stocks[item]
print(f'Total price: $general:.2f')


Create a solution that accepts a string input representing a grocery save object and an integer
input identifying the quantity of objects purchased on a recent visit. The following dictionary
purchase lists to be had items as the important thing and the cost in line with item because the
fee.

Buy = "bananas": 1.85, "steak": 19.Ninety nine, "cookies": 4.Fifty two, "celery": 2.81, "milk":
four.34

Additionally,

If fewer than 10 gadgets are purchased, the fee is the entire value in step with object.

If between 10 and 20 objects (inclusive) are purchased, the purchase gets a 5% discount.

If 21 or extra items are purchased, the purchase gets a ten% bargain.

Output the selected item and the overall buy price to 2 decimal locations.

The answer output should be in the layout:

amount item_purchased general price: $total_purchase_cost

buy = "bananas": 1.Eighty five, "steak": 19.Ninety nine, "cookies": four.52, "celery": 2.Eighty one,
"milk": four.34
print("Enter the object to buy:")

Document information

Uploaded on
September 7, 2026
Number of pages
9
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$15.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Ashley96
4.1
(178)
Sold
652
Followers
200
Items
5615
Last sold
1 day ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions