100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Samenvatting

Summary Midterm cheat-sheet

Beoordeling
-
Verkocht
1
Pagina's
5
Geüpload op
17-07-2024
Geschreven in
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.









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Documentinformatie

Geüpload op
17 juli 2024
Bestand laatst geupdate op
17 juli 2024
Aantal pagina's
5
Geschreven in
2023/2024
Type
Samenvatting

Onderwerpen

Voorbeeld van de inhoud

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.
€5,99
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Maak kennis met de verkoper
Seller avatar
EBEdocuments
4,5
(2)

Ook beschikbaar in voordeelbundel

Thumbnail
Voordeelbundel
Midterm and final cheat-sheets
-
2 2024
€ 13,98 Meer info

Maak kennis met de verkoper

Seller avatar
EBEdocuments Universiteit van Amsterdam
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
7
Lid sinds
5 jaar
Aantal volgers
5
Documenten
20
Laatst verkocht
7 maanden geleden

4,5

2 beoordelingen

5
1
4
1
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen