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

CSC401 - Introduction to Programming, Ch2 - CSC401, CSC 401 Test 2, python, Python Programming Review, Introduction to Computer Programming: Python, Python Programming Test, Introduction to Python 3 Programming, Introduction to Programming in Python st

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

CSC401 - Introduction to Programming, Ch2 - CSC401, CSC 401 Test 2, python, Python Programming Review, Introduction to Computer Programming: Python, Python Programming Test, Introduction to Python 3 Programming, Introduction to Programming in Python study guide with Q&As

Mostrar más Leer menos
Institución
CSC401 - Introduction To Programming
Grado
CSC401 - Introduction to Programming

Vista previa del contenido

CSC401 - Introduction to Programming, Ch2 - CSC401, CSC 401 Test 2,
python, Python Programming Review, Introduction to Computer
Programming: Python, Python Programming Test, Introduction to Python 3
Programming, Introduction to Programming in Python study guide with
Q&As


Data Type

String, Int, Float, Boolean

Class

Same as data type

How do you iterate through a list?

For Loop!
scores = [1,2,3,4]
for s in scores:
print(s)

Write a function named powers() that takes a positive integer n as input and prints, on the
screen, all the powers of 2 from 2^1 to 2^n.

def powers(n):
for i in range(1,n+1):
print(2**i)

How do you identify the length of a list?

len(list)

How do you iterate through a list by index instead of value?

range(len(list))

Iterate through list "pets" through the indexes

for i in range(len(pets)): #i is assigned 0, 1, 2...
print(pets[p]) #print object at index i

Why would you use range(len(list))?

,When you want to iterate through a list by index instead of value.

ie: list of strings
ie: when comparing values in a list.
-index i is followed by i+1

Python Data Types

- Integer
- Floating point
- Boolean
- String
- List

Algebraic Operators

+, -, , /, //, %, *

Algebraic Funtions

- abs()
- min()
- max()

Assignment Statement

x=4

Algebraic Expression

-3+7
-2*3+1
- 14//3
- 2**4

Boolean Expression

2<3
True

Comparison Operators

>, <, ==, >=, <=, !=

Boolean Operators

,- and
- or
- not

String Operators

- in
- not in
- s n, n s
-s+t
- s[i]

List Operators

- x in lst
- x not in lst
- lstA + lstB
- lst n, n lst
- lst[i]

List Functions

- len(lst)
- min(lst)
- max(lst)
- sum(lst)

List Methods

- lst.append(item)
- lst.count(item)
- lst.index(item)
- lst.insert(index, item)
- lst.pop()
- lst.remove(item)
- lst.reverse()
- lst.sort()

Constructors

- int()
- float()

, - str()
- list()

Implicit Type Conversion

>>> 3 + 0.35
3.35

Explicit Type Conversion

Attributes of a Variable

Name
Address
Type
Value
Scope
Lifetime

Language design binding

bounding a symbol to an operation

Language Implementation binding

type sizes vary from machine to machine but are bounded when the compiler is installed

Compile time binding

A variable is bound to a type when a program is compiled

Load time binding

When a program is loaded the addresses are bound to the variables

Link time binding

When a program links to a library the names of the variables and subprograms in the library are
bound

Static Type binding

Variable types does not change after the program compiles

Dynamic Type binding

Variable types are bounded during the runtime or can change during the runtime

Escuela, estudio y materia

Institución
CSC401 - Introduction to Programming
Grado
CSC401 - Introduction to Programming

Información del documento

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

Temas

$13.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.
MREXAMS Howard university
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
23
Miembro desde
2 año
Número de seguidores
1
Documentos
610
Última venta
2 semanas hace

2.5

4 reseñas

5
1
4
0
3
1
2
0
1
2

Documentos populares

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