Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Samenvatting

Samenvatting - Inleiding Programmeren voor CIW (800873-B-6) (800873-B-6)

Beoordeling
-
Verkocht
4
Pagina's
41
Geüpload op
15-12-2023
Geschreven in
2022/2023

Dit document biedt een uitgebreide samenvatting van het vak "Inleiding Programmeren voor CIW (800873-B-6)." De samenvatting behandelt essentiële concepten en programmeervaardigheden die in de cursus worden onderwezen. Het omvat een overzicht van programmeerfundamenten, zoals variabelen, datastructuren en controlestructuren en begrippen. Voor je tentamen is het vooral belangrijk om de begrippen goed te kennen. Als je letterlijke definities en functies goed onder de knie hebt, ben je al halverwege en haal je hoogstwaarschijnlijk een voldoende! This document provides a comprehensive summary of the course "Introduction to Programming for CIW (800873-B-6)." The summary covers essential concepts and programming skills taught in the course. It includes an overview of programming fundamentals, such as variables, data structures, and control structures and concepts. Knowing the concepts well is crucial for your exam. If you have a solid grasp of literal definitions and functions, you are halfway there and are likely to score well!

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

Week 1
Chapter 1 | Getting started with Variables and Values
Built-in functions
● print() → Outputs its argument to the screen.
● sum() → Sums up the numbers in the list.
● input() → Takes user input and returns it as a string.


Keywords
● Argument → Object you put in a function
● String → A sequence of characters
● Comment → Used to document our code and explain what’s happening
● Variable →
● Value →
● Re-assign a variable → The value of a variable changes


Calculations
● Summing → print(3+2)
● Subtracting → print(7-1)
● Multiplication → print(3*3)
● Division → print(10/3)
● Power → print(5**2)


Additional theory - Naming variables
1. Use clear, meaningful, descriptive variable names so that your code will remain
understandable.
2. Use the lowercase_with_underscores style, with lowercase characters and underscores
for separating words
3. Do not use built-in names, such as print or sum (these will turn green in Jupyter
Notebooks)

,Chapter 2 | Basic Data Types (Integers and Floats)
Built-in functions
● type() → To check object types.
Methods
● int() → Converts any number or string into an integer object.
● str() → Returns the string version of the object.
Keywords
● String → For representing text.
● Integer → For representing whole numbers.
Float → For representing numbers with decimals.
● Tuple → For representing immutable combinations of values.
● List → For representing ordered sequences of objects.
● Set → For representing unordered sets of objects.
● Dictionary → To represent mappings between objects
● Booleans → To represent the truth values True or False.
● Casting → Converting one type into another type.
● Coercion → Implicit type conversion. For example when you divide 2 integers with
each other the output is a float.
● Operator precedence → The order in which mathematical operations are performed.


Additional theory - Type affordances
It is possible to use “+” for adding up integers and floats. It is also possible to add strings
together. However, it is not possible to add strings and integers/floats up. Python will then
give an error.


Casting types
Not all conversions are possible. For example, we cannot make an integer of the string
“hello”.

,Mathematical operators

, Chapter 3 | Strings
Built-in functions
● repr() → Gives you the Python-internal representation of an object.
● len() → Lets you compute the length of a sequence. (spaces count as characters
too!)
● dir() → Returns a list of method names (as well as attributes of the object).
● help() → If you want to know what a specific method does.


Methods
● str.lower() → Turns a string into all lowercase characters
● str.upper() → Turns a string into all uppercase characters


Keywords
● Index number → The position of a character in a string. Positive index starts at 0.
Negative index starts at -1 and goes backwards.
● Mutability → Whether an object can change or not.
● Immutable → an object cannot be changed.
● f-strings → New string formatting mechanisms that make string interpolation
simpler.
● Method → A function that is associated with an object.
● Dunder methods → Method names that start and end with double underscores. They
are Python-internal.


Additional theory - Multi-line string
Two ways to span strings across multiple lines:
1. With single or double quotes, where we manually indicate that the rest of the string
continues on the next line with a backslash
→ \n (newline symbol) indicates that we want to start the rest of the text on a new
line in the string, the following \ indicates that we want the string to continue on the
next line of the code. Together ( \n\ ).
2. With three single or double quotes.
→ Another way to span strings across multiple lines is by simply using three single or
double quotes.

Geschreven voor

Instelling
Studie
Vak

Documentinformatie

Geüpload op
15 december 2023
Aantal pagina's
41
Geschreven in
2022/2023
Type
SAMENVATTING

Onderwerpen

$7.67
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
ibdeheer

Maak kennis met de verkoper

Seller avatar
ibdeheer Tilburg University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
12
Lid sinds
3 jaar
Aantal volgers
8
Documenten
5
Laatst verkocht
1 jaar geleden

0.0

0 beoordelingen

5
0
4
0
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

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen