100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Resumen

Totale samenvatting vak programming (800863-M-3)

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

Totale samenvatting van het vak programming; lectures + boek 8.5 for exam!!

Institución
Grado











Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Libro relacionado

Escuela, estudio y materia

Institución
Estudio
Grado

Información del documento

¿Un libro?
No
¿Qué capítulos están resumidos?
1 t/m 7, 9,10,13,16
Subido en
7 de noviembre de 2024
Número de páginas
70
Escrito en
2023/2024
Tipo
Resumen

Temas

Vista previa del contenido

1



Programming
Week 1 1
Chapter 1 1
Chapter 2 3
Lecture 1 6
Week 2 8
Chapter 2 8
Chapter 3 11
Chapter 4 15
Chapter 5 22
Lecture 2 24
Week 3 27
Chapter 6 27
Chapter 7 32
Lecture 3 39
Week 4 44
Chapter 9 44
Chapter 10 49
Lecture 4 52
Week 5 55
Chapter 13 55
Lecture 5 59
Week 6 61
Chapter 16 61
Lecture 6 65
Week 7 68
Lecture 7 68



Week 1

Chapter 1
Interactive shell -> REPL: read-evaluate-print loop -> lets you run (execute) python instructions
one at the time and instantly shows you the results.

Entering expressions in to the interactive shell
Launching the Mu editor, download when going through the set up in the preface.
MacOS open your applications folder and double click Mu

, 2


Click the new button and save an empty file as blank.py
When you run this blank file by clicking the run button, it will open the interactive shell which will
open as new pane that opens at the bottom of the Mu editor window.




The integer, floating-point, and string data types




Stings -> strs => need to put ‘ ‘ around a string
Error message: syntaxError: EOL while scanning string literal => probably forgot the final single
quote character at the end of a string.

String concatenation and replication
+ It joins the stings as the string concatenation operator
>>> ‘alice’+’bob’
‘Alicebob’

>>> ‘alice’ + 42
Can't use a string in combination with a integer value => TypeError: can only concatenate str
(not “int” to str

The * operator multiples two integer or floating-point values, but when * is used on one string
value and one integer value it becomes the string replication operator.
>>> ‘alice’ * 5
‘Alicealicealicealicealice’

, 3



Storing values in variables
A variable is initialized or created the first time a value is stored in it. After that you can use it in
expression with other variables and values. When a variable is assigned a new value the old
value is forgotten. This is called overwriting the variable.

A good variable name describes the data it contains. There are three rules:
- It can be only one word with no spaces
- It can use only letters, numbers and the underscore (_) character
- It can't begin with a number
Variable names are case-sensitive. Consistency with the style guide is important.



Chapter 2
Flow control statements can decide which python instructions to execute under which
conditions. These flow control statements directly correspond to the symbols in a flow chart.
-> flow chart is een goede representation of hoe programeren werkt

Boolean values
Boolean data type has two values: True and False -> always with capital F or T
Like any other value, boolean values are used in expressions and can be stored in variables. If
you don't use the proper case or you use true and false for variable names python will give an
error.

Comparison operators
Comparison operators, also called relational operators, compare two values and evaluate down
to a single boolean value.




An integer or floating-point value will always be unequal to a string value.
The <,>,<= and >= operators work properly only with integer and floating point values.

Boolean operators
Three boolean operators (and, or, and not) are used to compare boolean values. Like
comparison operators, they evaluate these expressions down to boolean values.

, 4



- Binary boolean operators: the ‘and’ and ‘or’ operators always take two boolean values
(or expressions) so they are considered binary operators.
The and operator evaluate an expression to true if both boolean values are true otherwise it
evaluates to false.




The or operator evaluates an expression to true if either of the two boolean values is true. If
both are false it evaluates to false.




- Unary operator -> The not operator
Unlike and/or the not operator operates only on e boolean value (or expression). This makes it a
unary operator. The not operator simply evaluates the opposite boolean value.

>>> not True
False

>>> not not not not Ture
True
$7.94
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

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.
brittvandewouw23 Tilburg University
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
17
Miembro desde
1 año
Número de seguidores
0
Documentos
10
Última venta
6 meses hace

0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

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