Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Samenvatting Basic Programming

Rating
-
Sold
-
Pages
9
Uploaded on
11-01-2024
Written in
2023/2024

Volledige samenvatting van Basic Programming van Emiel van Miltenburg (October 21, 2019, version 0.1)

Institution
Course

Content preview

 https://docs.python.org/3.5/library/stdtypes.html#set-types-set-frozenset
 Op die site kun je alles opzoeken (is officieel van Python)

• String for text.
• Integers and floats for whole and decimal numbers.
• Booleans for truth values.
• Lists for ordered sequences of objects.
• None for the special value of ‘nothing’.
• Set and frozenset for unordered collections of objects.
• Dictionary for mappings between objects.
• Tuple for immutable ordered sequences.


Type van een variabele




Er zijn verschillende types voor de volgende reden (+):
• Optellen van integers: 2 + 2 = 4
• Samenvoegen van strings: “2” + “2” = “22”
-> Wees ervan bewust wat voor variabele je gebruikt, anders doet het niet wat jij wilt!


Methoden
• x.startswith() -> let hierbij ook op met wat voor variabele je werkt




• Comments kun je plaatsen door middel van een string te gebruiken (“This is a comment”) ook dmv
een hashtag te gebruiken (#This is a comment)
-> Plaats elke zin op een nieuwe regel met een nieuwe hashtag


Strings
• len(my_string), laat zien hoeveel karakters je string heeft. LET OP! Hierbij worden ook
interpunctietekens en spaties meegeteld
• Index: begint bij 0 wanneer je vanaf links bekijkt, begint bij -1 wanneer je vanaf rechts bekijkt. Ook
hier worden de spaties en interpunctietekens meegenomen in de telling
- Substring = my_string[start:stop:stepsize] -> LET OP! De substring stopt na de letter die voor
de index van de stop komt
- My_string[:], je maakt een kopie van my_string
- My_string[::-1], met stapgrootte 1 draai je de string om
-> Dit wordt ook wel slicing genoemd en kan niet alleen bij strings, maar ook bij lists en tuples (sets
en dictionaries zijn niet geordend dus daarbij werkt het niet)

, Manipulatie van strings (van string tot string)




Manipulaties die niet van string tot string functies zijn en dus meerdere types bevatten (geen
Booleans)




Stringmethoden die een Boolean variabele teruggeven

Written for

Institution
Study
Course

Document information

Uploaded on
January 11, 2024
Number of pages
9
Written in
2023/2024
Type
SUMMARY

Subjects

$7.85
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF


Also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Nora101 Tilburg University
Follow You need to be logged in order to follow users or courses
Sold
75
Member since
2 year
Number of followers
32
Documents
42
Last sold
1 month ago

Ik hoop (aankomende) Communicatie- en Informatiewetenschappen studenten door middel van mijn samenvattingen en aantekeningen te helpen in hun collegejaren door de moeite van het schrijven van samenvattingen en het geld voor het aanschaffen van boeken te ontnemen. Ook hoop ik door de college aantekeningen te delen, dat studenten tijdens de colleges beter kunnen opletten en de stof na het zien van mijn aantekeningen beter begrijpen.

4.3

4 reviews

5
2
4
1
3
1
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions