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
Document preview thumbnail
Vista previa 2 fuera de 14 páginas
Examen

ENGR 102 EXAM 2 EXAM WITH CORRECT ACTUAL QUESTIONS AND CORRECTLY WELL DEFINED ANSWERS LATEST ALREADY GRADED A+

Document preview thumbnail
Vista previa 2 fuera de 14 páginas

ENGR 102 EXAM 2 EXAM WITH CORRECT ACTUAL QUESTIONS AND CORRECTLY WELL DEFINED ANSWERS LATEST ALREADY GRADED A+

Vista previa del contenido

ENGR 102 EXAM 2 EXAM WITH CORRECT
ACTUAL QUESTIONS AND CORRECTLY WELL
DEFINED ANSWERS LATEST ALREADY GRADED
A+

Save




Terms in this set (37)



1. List 5 good coding practices that # Q1
have been mentioned in this course. # always comment your code
# keep your code simple
# test your code often, work through it in groups
# be consistent with your code
# use good identifying variables
# write as few of lines as possible


2. In the following dictionary, # Q2
identify the keys and values. Write mydict = {'Apple' : 3, 'Pear' : 5, 'Banana' : 2}
the command to add the items mydict['Orange'] = 1
'Orange' and 1 to the dictionary. print(mydict.items()) # prints items as list
What does the command print(mydict) # *** whats diff ??? ***
print(mydict.items()) output to the # cannot do this, a dictionary does not have
console? mydict = {'Apple' : 3, 'Pear' append or add
: 5, 'Banana' : 2} # mydict.append("'Orange' : 1")


3. Explain how dictionaries are # Q3
different from lists, and how lists are # dictionaries are a table of key values while a list
different from tuples. # is an ordered collection of items
# lists are mutable, tuples are not

, 4. Identify and explain 3 ways # Q4
strings are similar to lists # are similar bc both are used to store data and
are a collection of items


5. List all of the data types we have # Q5
seen in this course and provide an # integers : 9 : immutable
example of each. Identify which # floating-point : 2.9 : immutable
ones are mutable and which are # tuples/ strings : "" : immutable
immutable. # lists/ dictionaries : [] {} : mutable


6. In your own words, explain the # Q6
difference between the top-down # Top down programming, in simple terms, is
and bottom-up design methods. dividing
Name at least one advantage and # and conquering a problem, Bottum-up
one disadvantage for each. programming is
# used when you're not sure where to start your
code


7. Describe the various components # Q7
of a hierarchy. How can we use one # A hierarchy is an organized structure where
in program design? items are
# ranked based on level of importance. As the
tree
# descends, the tasks become less important.

Información del documento

Subido en
6 de julio de 2026
Número de páginas
14
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
Gratis
Descarga

¿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

Vendido
14
Seguidores
0
Artículos
1423
Última venta
1 día hace


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