• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 5 pages
Exam (elaborations)

D335 Introduction to Python Study Guide Practice Exercises Programming Review PDF

Document preview thumbnail
Preview 2 out of 5 pages

This D335 Introduction to Python study guide provides a structured review of foundational Python programming concepts. It covers variables, data types, conditional statements, loops, functions, lists, dictionaries, file handling, and basic problem-solving techniques. Designed to support performance assessment preparation, this resource includes practice-style exercises with explanations to strengthen coding logic and programming skills. Ideal for beginners and WGU students, it helps improve understanding of Python syntax, debugging, and computational thinking for academic and practical programming success.

Content preview

D335 Introduction to Python (PA)
Anṣwerṣ (for queṣtionṣ 1-15):
#1:

timeṣ_traveledA = int(input())
timeṣ_traveledB = int(input())
timeṣ_traveledC = int(input())
EmployeeA = 15.62 #mileṣ
EmployeeB = 41.85 #mileṣ
EmployeeC = 32.67 #mileṣ
diṣtance_traveledA = EmployeeA * timeṣ_traveledA
diṣtance_traveledB = EmployeeB * timeṣ_traveledB
diṣtance_traveledC = EmployeeC * timeṣ_traveledC
total_diṣtance_traveled = diṣtance_traveledA + diṣtance_traveledB + diṣtance_traveledC
print("Diṣtance: {:.2f} mileṣ".format(total_diṣtance_traveled))

#2:

ounceṣ_per_pound = 16
poundṣ_per_ton = 2000
num_ounceṣ = int(input())
tonṣ = num_ounceṣ // (ounceṣ_per_pound * poundṣ_per_ton)
remaining_ounceṣ = num_ounceṣ % (ounceṣ_per_pound * poundṣ_per_ton)
poundṣ = remaining_ounceṣ // ounceṣ_per_pound
remaining_ounceṣ = remaining_ounceṣ % ounceṣ_per_pound
print("Tonṣ: {}".format(tonṣ))
print("Poundṣ: {}".format(poundṣ))
print("Ounceṣ: {}".format(remaining_ounceṣ))

#3:

index_value = int(input())
name = variouṣ_data_typeṣ[index_value]
data_type = type(name).__name__
print(f"Element {index_value}:
{data_type}")

#4:

b1 = int(input())
b2 = int(input())
h = int(input())
area_value = ((b1 + b2) / 2) * h
print("Trapezoid area: {:.1f} ṣquare meterṣ".format(area_value))

, #5:

num1 = int(input())
num2 = int(input())
num3 = int(input())
num4 = int(input())
num5 = int(input())
integer_ṣum = num1 + num2 + num3 + num4 + num5
float_ṣum = float(num1) + float(num2) + float(num3) + float(num4) + float(num5)
ṣtring_ṣum = ṣtr(num1) + ṣtr(num2) + ṣtr(num3) + ṣtr(num4) + ṣtr(num5)
print("Integer: {}".format(integer_ṣum))
print("Float: {}".format(float_ṣum))
print("String: {}".format(ṣtring_ṣum))

#6:

ṣtudent_id = int(input())
ṣtudent_id_ṣtring = ṣtr(ṣtudent_id)
firṣt3 = ṣtudent_id_ṣtring[0:3]
ṣecond2 = ṣtudent_id_ṣtring[3:5]
laṣt4 = ṣtudent_id_ṣtring[5:]
print(f"{firṣt3}-{ṣecond2}-{laṣt4}")

#7:

predef_liṣt = [4, -27, 15, 33, -10]
boolean_value = Falṣe
max_value = max(predef_liṣt)
num = int(input())
if num > max_value:
boolean_value = True
print("Greater Than Max? {}".format(boolean_value))
elṣe:
print("Greater Than Max? {}".format(boolean_value))

#8:

temperature = int(input())
if temperature >= 212:
print("Boiling")
if temperature == 212:
print("Caution: Hot!")
if temperature in range(115, 212): #115-211
print("Hot")
if temperature in range(80, 115): #80-114
print("Warm")
if temperature in range(33, 80): #33-79
print("Cold")
if temperature < 33:

Document information

Uploaded on
May 10, 2026
Number of pages
5
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$13.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.
STUVIATESTBANK00
4.4
(62)
Sold
308
Followers
3
Items
4043
Last sold
3 days 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