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
Exam (elaborations)

Western Governors University D335 Introduction to Python Pre-Assessment Questions and Answers

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
10-05-2026
Written in
2025/2026

This study resource provides a collection of pre-assessment questions and answers for Western Governors University D335 Introduction to Python. It is designed to help learners strengthen their understanding of foundational programming concepts and prepare for coursework assessments through structured practice. The material covers key topics such as Python syntax, variables, data types, conditional statements, loops, functions, lists, dictionaries, input and output operations, and basic problem-solving techniques. It is suitable for revision, self-assessment, and building confidence in introductory programming and software development concepts.

Show more Read less
Institution
Computer Science
Course
Computer science

Content preview

D335 Introdučtion to Python (PA)
Answers (for questions 1-15):
#1:

times_traveledA = int(input())
times_traveledB = int(input())
times_traveledC = int(input())
EmployeeA = 15.62 #miles
EmployeeB = 41.85 #miles
EmployeeC = 32.67 #miles
distanče_traveledA = EmployeeA * times_traveledA
distanče_traveledB = EmployeeB * times_traveledB
distanče_traveledC = EmployeeC * times_traveledC
total_distanče_traveled = distanče_traveledA + distanče_traveledB + distanče_traveledC
print("Distanče: {:.2f} miles".format(total_distanče_traveled))

#2:

ounčes_per_pound = 16
pounds_per_ton = 2000
num_ounčes = int(input())
tons = num_ounčes // (ounčes_per_pound * pounds_per_ton)
remaining_ounčes = num_ounčes % (ounčes_per_pound * pounds_per_ton)
pounds = remaining_ounčes // ounčes_per_pound
remaining_ounčes = remaining_ounčes % ounčes_per_pound
print("Tons: {}".format(tons))
print("Pounds: {}".format(pounds))
print("Ounčes: {}".format(remaining_ounčes))

#3:

index_value = int(input())
name = various_data_types[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} square meters".format(area_value))

, #5:

num1 = int(input())
num2 = int(input())
num3 = int(input())
num4 = int(input())
num5 = int(input())
integer_sum = num1 + num2 + num3 + num4 + num5
float_sum = float(num1) + float(num2) + float(num3) + float(num4) + float(num5)
string_sum = str(num1) + str(num2) + str(num3) + str(num4) + str(num5)
print("Integer: {}".format(integer_sum))
print("Float: {}".format(float_sum))
print("String: {}".format(string_sum))

#6:

student_id = int(input())
student_id_string = str(student_id)
first3 = student_id_string[0:3]
sečond2 = student_id_string[3:5]
last4 = student_id_string[5:]
print(f"{first3}-{sečond2}-{last4}")

#7:

predef_list = [4, -27, 15, 33, -10]
boolean_value = False
max_value = max(predef_list)
num = int(input())
if num > max_value:
boolean_value = True
print("Greater Than Max? {}".format(boolean_value))
else:
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:

Written for

Institution
Computer science
Course
Computer science

Document information

Uploaded on
May 10, 2026
Number of pages
5
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$13.99
Get access to the full document:

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

Get to know the seller
Seller avatar
mindvault

Get to know the seller

Seller avatar
mindvault California State University - San Jose State University
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 months
Number of followers
0
Documents
668
Last sold
-
Exam success essentials

Get ahead in your studies with premium, up-to-date test banks and solution manuals. Designed to boost your understanding and exam performance, these resources help you study smarter, save time, and pass with ease.⭐ Loved the document? Please don’t forget to leave a review after your purchase — your feedback helps me grow and keeps more quality materials coming your way! ⭐

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

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