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
Resumen

Summary Midterm cheat-sheet

Puntuación
-
Vendido
1
Páginas
5
Subido en
17-07-2024
Escrito en
2023/2024

This document contains the cheat-sheet used during the midterm exam. Using this cheat-sheet I obtained a grade of 8/10 for my midterm. I advise you to use this cheat-sheet as a reference and put it in your own words.

Institución
Grado

Vista previa del contenido

Indexing and range (starting from 0 by default)
○ [start (inclusive) : end (exclusive) : stepsize (optional)] = [0, 1, 2, 3] = [-4, -3, -2, -1]. Tip: end - start is the number of elements returned
○ Range(start (inclusive), stop (exclusive), stepsize). Range(3): 0, 1, 2. The start, stop and step parameters work the same as in list slicing.
○ Set function is used to create a set, particularly useful for removing duplicates from a list or character returns as { }.

Slicing (for lists, strings and tuples)
○ To copy a list in Python and ensure that changes to the new list do not affect the original list, you can use the list( ) or copy( ) functions, or
create a copy of a list by slicing it from the beginning to the end x[ : ] or x[ : : ]. Do not use the equal to sign to copy lists.
○ With positive steps you go from the start index to the right, with negative steps you go from the end to the left.
○ [ : : -1] reverses the list. [ : index] starts from index zero. [index : ] ends at, including the last element.

Importing packages – import package (as nickname). If you want to make your import more selective use – from package import function.

Functions
○ A function in Python is an object that encapsulates executable code, which can
be invoked by its name. Functions are defined with parameters in their headers,
and when called, arguments are passed to these parameters.
○ It may return a value using a return statement; if no return statement is
executed, None is returned by default.
○ Python fills any explicitly defined parameters first with the provided arguments.

Escuela, estudio y materia

Institución
Estudio
Grado

Información del documento

Subido en
17 de julio de 2024
Archivo actualizado en
17 de julio de 2024
Número de páginas
5
Escrito en
2023/2024
Tipo
RESUMEN

Temas

$7.70
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
EBEdocuments
4.5
(2)

Documento también disponible en un lote

Conoce al vendedor

Seller avatar
EBEdocuments Universiteit van Amsterdam
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
7
Miembro desde
5 año
Número de seguidores
5
Documentos
20
Última venta
10 meses hace

4.5

2 reseñas

5
1
4
1
3
0
2
0
1
0

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