100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4,6 TrustPilot
logo-home
Examen

WGU D335 INTRODUCTION TO PROGRAMMING IN PYTHON FINAL 2025/2026 TEST EXAM REVIEW COMPLETE STUDY QUESTIONS WITH CORRECT VERIFIED ANSWERS 100% GUARANTEED PASS | RATED A+

Puntuación
-
Vendido
-
Páginas
10
Grado
A+
Subido en
18-09-2025
Escrito en
2025/2026

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. The solution output should be in the format Total price: $cost_of_stocks - Answer>>> num_stock = int(input()) cost_of_stocks = 0 for _ in range(num_stock): stock_selection = input() if stock_selection in stocks: cost_of_stocks += stocks[stock_selection] print(f"Total price: ${cost_of_stocks:.2f}") Create a solution that accepts an input identifying the name of a CSV file, for example, "". Each file contains two rows of comma-separated values. Import the built-in module csv and use its open() function and reader() method to create a dictionary of key:value pairs for each row of comma-separated values in the specified file. Output the file contents as two dictionaries. The solution output should be in the format {'key': 'value', 'key': 'value', 'key': 'value'} {'key': 'value', 'key': 'value', 'key': 'value'} - Answer>>> import csv input1 = input() with open(input1, "r") as f: data = r(f) for row in data: even = [row[i].strip() for i in range(0, len(row), 2)] odd = [row[i].strip() for i in range(1, len(row), 2)] pair = dict(zip(even, odd)) print(pair) Create a solution that accepts three integer inputs representing the number of times an employee travels to a job site. Output the total distance traveled to two decimal places given the following miles per employee commute to the job site. Output the total distance traveled to two decimal places given the following miles per employee commute to the job site: Employee A: 15.62 miles Employee B: 41.85 miles Employee C: 32.67 miles The solution output should be in the format Distance: total_miles_traveled miles - Answer>>> travels = { "A": int(input()), "B": int(input()), "C": int(input()) } miles_per_employee = {"A": 15.62, "B":41.85, "C": 32.67} total_miles_traveled = sum(travels[employee] * miles_per_employee[employee] for employee in travels) print(f"Distance: {total_miles_traveled:.2f} miles") Create a solution that accepts one integer input representing the index value for any of the string elements in the following list: frameworks = ["Django", "Flask", "CherryPy", "Bottle", "Web2Py", "TurboGears"]

Mostrar más Leer menos
Institución
WGU D335 INTRODUCTION TO PROGRAMMING IN PYTHON
Grado
WGU D335 INTRODUCTION TO PROGRAMMING IN PYTHON









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
WGU D335 INTRODUCTION TO PROGRAMMING IN PYTHON
Grado
WGU D335 INTRODUCTION TO PROGRAMMING IN PYTHON

Información del documento

Subido en
18 de septiembre de 2025
Número de páginas
10
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

WGU D335 INTRODUCTION TO PROGRAMMING IN PYTHON
FINAL 2025/2026 TEST EXAM REVIEW COMPLETE STUDY
QUESTIONS WITH CORRECT VERIFIED ANSWERS 100%
GUARANTEED PASS | RATED A+
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.

The solution output should be in the format

Total price: $cost_of_stocks - Answer>>> num_stock = int(input())

cost_of_stocks = 0

for _ in range(num_stock):

stock_selection = input()

if stock_selection in stocks:

cost_of_stocks += stocks[stock_selection]

print(f"Total price: ${cost_of_stocks:.2f}")

Create a solution that accepts an input identifying the name of a CSV file, for example,
"input1.csv". Each file contains two rows of comma-separated values. Import the built-in module
csv and use its open() function and reader() method to create a dictionary of key:value pairs for
each row of comma-separated values in the specified file. Output the file contents as two
dictionaries.

The solution output should be in the format

, {'key': 'value', 'key': 'value', 'key': 'value'} {'key': 'value', 'key': 'value', 'key': 'value'} - Answer>>>
import csv

input1 = input()

with open(input1, "r") as f:

data = csv.reader(f)

for row in data:

even = [row[i].strip() for i in range(0, len(row), 2)]

odd = [row[i].strip() for i in range(1, len(row), 2)]

pair = dict(zip(even, odd))

print(pair)

Create a solution that accepts three integer inputs representing the number of times an employee
travels to a job site. Output the total distance traveled to two decimal places given the following
miles per employee commute to the job site. Output the total distance traveled to two decimal
places given the following miles per employee commute to the job site:

Employee A: 15.62 miles

Employee B: 41.85 miles

Employee C: 32.67 miles

The solution output should be in the format

Distance: total_miles_traveled miles - Answer>>> travels = {

"A": int(input()),

"B": int(input()),

"C": int(input())

}

miles_per_employee = {"A": 15.62, "B":41.85, "C": 32.67}
$11.49
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

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.
ASTUDYAIDS EGERTTON
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
10
Miembro desde
3 año
Número de seguidores
4
Documentos
594
Última venta
2 meses hace
HOME OF EXAM(s), SUMMARIES, TEST BANKS AND NOTES

All Latest Quality examinations (elaborations) , summaries, study guides for you can easily acquire at any place of interest at any comfortable time. Thank you for your reviews. Growth in knowledge is growth in our future.

2.3

3 reseñas

5
1
4
0
3
0
2
0
1
2

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