Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Examen

WGU D335 INTRO TO PYTHON OA OBJECTIVE ASSESSMENT ACTUAL QUESTIONS AND ANSWERS 2026 UPDATE 100% CORRECT ALREADY GRADED A+ LATEST VERSION

Puntuación
-
Vendido
-
Páginas
24
Grado
A+
Subido en
21-02-2026
Escrito en
2025/2026

"Create a solution that accepts an integer input representing the index value for any any of the five elements in the following list: various_data_types = [516, 112.49, True, "meow", ("Western", "Governors", "University"), {"apple": 1, "pear": 5}] Using the built-in function type() and getting its name by using the .name attribute, output data type (e.g., int", "float", "bool", "str") based on the input index value of the list element. - CORRECT ANSWER=index_value = int(input()) name = various_data_types[index_value] data_type = type(name).__name__ print(f"Element {index_value}: {data_type}")" "Create a solution that accepts an integer input. Import the built-in module math and use its factorial() method to calculate the factorial of the integer input. Output the value of the factorial, as well as a Boolean value identifying whether the factorial output is greater than 100. - CORRECT ANSWER=import math fact = int(input()) x = rial(fact) print(x) if x 100: print('True') else: print('False')"

Mostrar más Leer menos
Institución
D335
Grado
D335

Vista previa del contenido

WGU D335 INTRO TO PYTHON OA
OBJECTIVE ASSESSMENT ACTUAL
QUESTIONS AND ANSWERS 2026
UPDATE 100% CORRECT ALREADY
GRADED A+ LATEST VERSION
"Create a solution that accepts an integer input representing the index value for any any of the
five elements in the following list:
various_data_types = [516, 112.49, True, "meow", ("Western", "Governors", "University"),
{"apple": 1, "pear": 5}]
Using the built-in function type() and getting its name by using the .name attribute, output data
type (e.g., int", "float", "bool", "str") based on the input index value of the list element. -
CORRECT ANSWER=>index_value = int(input())
name = various_data_types[index_value]
data_type = type(name).__name__
print(f"Element {index_value}: {data_type}")"

"Create a solution that accepts an integer input. Import the built-in module math and use its
factorial() method to calculate the factorial of the integer input. Output the value of the
factorial, as well as a Boolean value identifying whether the factorial output is greater than 100.
- CORRECT ANSWER=>import math
fact = int(input())
x = math.factorial(fact)
print(x)
if x > 100:
print('True')
else:
print('False')"

"Create a solution that accepts any three integer inputs representing the base (b1, b2) and
height (h) measurements of a trapezoid in meters. Output the exact area of the trapezoid in

1|Page

,square meters as a float value. The exact area of a trapezoid can be calculated by finding the
average of the two base measurements, then multiplying by the height measurement.
Trapezoid Area Formula:A = [(b1 + b2) / 2] * h - CORRECT ANSWER=>b1 = int(input())
b2 = int(input())
h = int(input())
area_value = ((b1 + b2) /2) * h
print('Trapezoid area: {:.1f} square meters'.format(area_value))"

"Create a solution that accepts an integer input representing the age of a pig. Import the
existing module pigAge and use its pre-built pigAge_converter() function to calculate the human
equivalent age of a pig. A year in a pig's life is equivalent to five years in a human's life. Output
the human-equivalent age of the pig. - CORRECT ANSWER=>import pigAge
def pigAge_converter(pig_age):
return pig_age * 5
pig_age = int(input())
converted_pig_age = pigAge_converter(pig_age)
print(f'{pig_age} is {converted_pig_age} in human years')"

"Create a solution that accepts five integer inputs. Output the sum of the five inputs three
times, converting the inputs to the requested data type prior to finding the sum.
First output: sum of five inputs maintained as integer values
Second output: sum of five inputs converted to float values
Third output: sum of five inputs converted to string values (concatenate) - CORRECT
ANSWER=>num1 = int(input())
num2 = int(input())
num3 = int(input())
num4 = int(input())
num5 = int(input())
first_output = num1 + num2 + num3 + num4 + num5
second_output = float(num1) + float(num2) + float(num3) + float(num4) + float(num5)
third_output = str(num1) + str(num2) + str(num3) + str(num4) + str(num5)
print('Integer: {}'.format(first_output))
print('Float: {}'.format(second_output))
print('String: {}'.format(third_output))"

"Create a solution that accepts a string input representing a grocery store item and an integer
input identifying the number of items purchased on a recent visit. The following dictionary
purchase lists available items as the key with the cost per item as the value.

2|Page

, purchase = {"bananas": 1.85, "steak": 19.99, "cookies": 4.52, "celery": 2.81, "milk": 4.34}
Additionally,
If fewer than ten items are purchased, the price is the full cost per item.
If between ten and twenty items (inclusive) are purchased, the purchase gets a 5% discount.
If twenty-one or more items are purchased, the purchase gets a 10% discount.
Output the chosen item and total cost of the purchase to two decimal places. - CORRECT
ANSWER=>store_item = input()
num_items = int(input())
total_cost = purchase[store_item] * num_items
if num_items < 10:
print(store_item, "${:.2f}".format(total_cost))
if num_items in range(10,21):
discount = total_cost * 0.05
total_cost = total_cost - discount
print(store_item, '${:.2f}'.format(total_cost))
if num_items >= 21:
discount = total_cost * 0.10
total_cost = total_cost - discount
print(store_item, '${:.2f}'.format(total_cost))"

"Create a solution that accepts an integer input representing a 9-digit unformatted student
identification number. Output the identification number as a string with no spaces. - CORRECT
ANSWER=>student_id = int(input())
student_id_string = str(student_id)
first3 = student_id_string[0:3]
second2 = student_id_string[3:5]
third4 = student_id_string[5:]
print(f'{first3}-{second2}-{third4}')"

"Create a solution that accepts an integer input identifying how many shares of stock are to be
purchased from the Old Town Stock Exchange, followed by an equivalent number of string
inputs representing the stock selections. The following dictionary stock lists available stock
selections as the key with the cost per selection as the value.
stocks = {'TSLA': 912.86 , 'BBBY': 24.84, 'AAPL': 174.26, 'SOFI': 6.92, 'KIRK': 8.72, 'AURA': 22.12,
'AMZN': 141.28, 'EMBK': 12.29, 'LVLU': 2.33}
Output the total cost of the purchased shares of stock to two decimal places. - CORRECT
ANSWER=>num_stock = int(input())
total_cost = 0

3|Page

Escuela, estudio y materia

Institución
D335
Grado
D335

Información del documento

Subido en
21 de febrero de 2026
Número de páginas
24
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$18.99
Accede al documento completo:

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
ExcelHub Chamberlain College Of Nursing
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
29
Miembro desde
1 año
Número de seguidores
0
Documentos
1077
Última venta
5 meses hace
Excel-Hub YOUR TRUSTED HUB FOR EXCEPTIONAL STUDY RESOURCES!

Welcome to Excel-Hub your go-to source for high-quality test banks and study materials designed to help you excel academically. I offer a comprehensive range of resources including test banks, solution manuals, and other study materials, all meticulously curated to ensure accuracy and effectiveness. They are affordable, well discounted especially the package deals and instantly available, making your learning experience seamless and efficient. Trust Excel-Hub to be your partner in academic success, providing the tools you need to achieve your educational goals. I understand the importance of high-quality, dependable materials in your academic journey. That’s why every document in my store is thoughtfully created to meet your specific needs, ensuring you have the tools to succeed with confidence. Be sure to Excel! I’d love to hear about your experience! Please leave a review of your experience with the study documents.

Lee mas Leer menos
4.0

3 reseñas

5
1
4
1
3
1
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes