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

CSCA08 Lecture Notes (1-12) and PCRS Example Questions and Answers

Puntuación
-
Vendido
1
Páginas
9
Subido en
15-10-2021
Escrito en
2019/2020

CSCA08 Lecture Notes (1-12) and PCRS Example Questions and Answers

Institución
Grado









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

Escuela, estudio y materia

Institución
Estudio
Grado

Información del documento

Subido en
15 de octubre de 2021
Número de páginas
9
Escrito en
2019/2020
Tipo
Notas de lectura
Profesor(es)
Anya tafliovich
Contiene
Todas las clases

Temas

Vista previa del contenido

Lecture Jan 7, 2020
● Syllabus, PCRS, and general introductions
Lecture 02
● Terminology
○ 1+2
■ Operators = +
■ Operands = 1, 2
○ -3
■ Operator = -
■ Operand = 3
● Order of arithmetic precedence
○ ()
○ **
○ - (negative sign)
○ *, /, //, %
○ -, +
● Python documentation
○ Ex. round(number, ndigits=None)
■ Round = function
■ Number = first argument
■ Ndigits = second argument
■ = None
● If the second argument is provided, round will use the provided argument.
Otherwise, round will use the value None for the second argument
● Ex. round(42.54335, 2) = 42.54
● Ex. round(42.54335) = 43
● Ex. round(1234.5678, -2) = 1200.0
PCRS Jan 15, 2020
● Argument = values given
○ Ex. data = 3
data2 = 7.5
result = min(data, data2)
● Parameters = values not given
○ Ex. def f(data):
return data * 0.5
Lecture 03 Tues Jan 14, 2020
● Terminology
○ x=1
■ x has gets 1
■ x refers to the value of 1
■ x has a memory address of id1
■ memory address id1 is stored in variable
● Naming variables
○ Starts with a letter or underscore only
○ Contains only letters, digits, or underscores
○ Case sensitive
PCRS Weds Jan 15, 2020
● Function design recipe
○ Examples
○ Header

, ○ Description
○ Body
○ Test
Lecture 04 Thurs Jan 16, 2020
● Midterm expected for first week of february
● Worksheet “Function Design Recipe”
○ Strings always have quotes
○ print(‘yes \n no’)
yes
no
○ print(‘yes \’ no’)
■ yes ‘ no
○ repeat_word(‘smiles’, 0)
■ ‘’
Lecture 05 Tues Jan 21, 2020
● Python considers strings as values too, when it comes to strings
○ Dictionary order
■ ‘abs’ < ‘bsd’
True
■ ‘bs’ <= ‘asd’
False (python evaluates one character at a time, b with a, then s with s)
■ ‘B’ <= ‘a’
True (all lowercase letters come before all uppercase letters)
■ ‘’ < ‘b’
True (empty strings come before all lowercase and all uppercases)
● Priority
○ Arithmetic functions and amounts (greater, less than, etc.) are evaluated left to right
■ Ex. 1 + 1 == 2
True (better to write as (1 + 1) == 2)
● Boolean Operators
○ Priority = Not > Or > And (NOA)
○ And
■ True and True = True
■ T and F = F
■ F and F = F
■ F and T = F
○ Or
■ T or T = T
■ T or F = T
■ F or F = F
■ F or T = T
○ Not

○ Evaluating Left to Right
■ As long as there aren’t any syntax error, it can return an answer. If items are undefined
or don’t make sense, it does not evaluate
● Ex. True and not not not False or (1 + 3) >= Kaveh
True
● If statements
○ Only one “if” and “else”, and an unlimited amount of “elif” in the middle.
9,75 €
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.
StudentUofT UofT
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
49
Miembro desde
4 año
Número de seguidores
6
Documentos
52
Última venta
1 mes hace
UofT LifeSci and Bird Courses

5,0

4 reseñas

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