8000 Adding lesson 10 and updating a bunch of tweaks · uceimmp/python@a4193de · GitHub
[go: up one dir, main page]

Skip to content

Commit a4193de

Browse files
committed
Adding lesson 10 and updating a bunch of tweaks
1 parent 02fe86a commit a4193de

File tree

7 files changed

+576
-586
lines changed

7 files changed

+576
-586
lines changed

session_05/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# Session 5
22

33
In this session we cover:
4+
- Importing modules
5+
- Random/Math library
6+
- While loops
7+
- Shorthand arithmetic
8+
- Infinite loops
9+
- Break statements

session_05/slides/session_5.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,6 @@ for letter in "supeRcaliFragiListiCexPiaLidOcIous".lower():
159159

160160
# Ranges
161161

162-
[.code-highlight: 1-2]
163-
[.code-highlight: 4-5]
164-
[.code-highlight: 7-8]
165162
```python
166163
range(10)
167164
#[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
@@ -497,5 +494,5 @@ for x in range(times_to_loop):
497494
---
498495

499496
# [fit] Next Session
500-
### Thursday xth May 10am
497+
### Thursday 11th June 10am
501498
### Answers

session_09/slides/answers_9.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# [fit] IHF: Code
22
## [fit] Python — Session 9 — Answers
3-
### Live at 2pm
3+
### Live at 10am
44

55
---
66

77
## Any Questions
8-
### go to sli.do #ihfcode
8+
### go to sli.do #python2020
99

1010
---
1111

1212
# [fit] Next Session
13-
### Tuesday 9th June 2pm
14-
### Lesson 9
13+
### Tuesday 9th June 10am
14+
### Lesson 10

session_10/exercises/.gitignore

Whitespace-only changes.

session_10/exercises/exercises_10.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
## Section 5 Exercises
1+
## Section 10 Exercises
22

3-
4-
## Section 9 Exercises
5-
6-
# SECTION A
3+
# Section A
74
1. Create a Person class, initialise it with a name. Create a method that will say hello to the name.
85
2. Create a Square class, initialise it with a width and height. Create a method for the perimeter and area.
96
3. Create a Vehicle class, initialise it with, wheels, colour. Create a method for the miles and a method to display all this information.
@@ -14,15 +11,3 @@
1411
- display_info - It should display all the information of the employee.
1512
- set_department - It should assign the department to employee.
1613
- set_bonus - It should assign a bonus amount to the employee.
17-
18-
19-
# SECTION A
20-
1. Read the file 'jabberwocky.txt' and print its content to the screen
21-
2. Read the file 'austen.txt' and print the amount of lines in the file
22-
3. Each line of the file 'numbers.txt' contains a number, write a script to add up all the values in the file
23-
24-
# SECTION B
25-
1. Ask the user to enter their name and append this to a file called 'register.txt'
26-
2. Create a new file called 'even.txt' that contains only the even numbers from the file 'numbers.txt'
27-
3. 'secret.txt' contains a secret message. Each number represents the letter of the alphabet where 1 = A, 2 = B ... Z = 26. Work out what the secret message says
28-
4. Benford’s law states that the leading digits in a collection of data are probably going to be small. For example, most numbers in a set (about 30%) will have a leading digit of 1, when the expected probability is 11.1% (i.e. one out of nine digits). Fake data is usually evenly distributed, where as real data is not. The files 'accounts_1.txt', 'accounts_2.txt' and 'accounts_3.txt' contain financial transaction data. Work out which of the files contains fake data.

0 commit comments

Comments
 (0)
0