Skip to content

Commit 1b3fc3a

Browse files
reformateed the topic pages for one less level of nesting
1 parent 780434c commit 1b3fc3a

24 files changed

Lines changed: 105 additions & 284 deletions

File tree

‎source/exercises/args_kwargs_lab.rst‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _exercise_args_kwargs_lab:
22

3-
``args`` and ``kwargs`` LAB
3+
``args`` and ``kwargs`` Lab
44
===========================
55

66
Goal:
@@ -36,9 +36,10 @@ So while these won't be useful tests in the usual sense, this is a chance to get
3636
Procedure
3737
---------
3838

39-
We are going to do this as test driven development: Your first task for each step below is to write a test that will ensure your code does whatvwe are telling you it should do.
39+
We are going to do this as test driven development: Your first task for each step below is to write a test that will ensure your code does what you think it should do.
4040

41-
**Keyword arguments:**
41+
Keyword Arguments
42+
-----------------
4243

4344
* Write a function that has four optional parameters (with defaults):
4445

@@ -61,7 +62,7 @@ We are going to do this as test driven development: Your first task for each ste
6162

6263
- using a combination of positional and keyword
6364

64-
- ````func('purple', link_color='red', back_color='blue')``
65+
- ``func('purple', link_color='red', back_color='blue')``
6566

6667
- using ``*some_tuple`` and/or ``**some_dict``
6768

@@ -72,7 +73,8 @@ We are going to do this as test driven development: Your first task for each ste
7273
- ``func(*regular, **links)``
7374

7475

75-
**Generic parameters:**
76+
Generic parameters
77+
------------------
7678

7779
* Write a new function with the parameters as:
7880

‎source/exercises/file_lab.rst‎

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.. _exercise_file_lab:
2+
3+
#############
4+
File Exercise
5+
#############
6+
7+
8+
Goal:
9+
=====
10+
11+
Get a little bit of practice with handling files and parsing simple text.
12+
13+
14+
Paths and File Processing
15+
=========================
16+
17+
* Write a program which prints the full path for all files in the current
18+
directory, one per line. Use either the ``os`` module or ``pathlib``.
19+
20+
* Write a program which copies a file from a source, to a destination
21+
(without using shutil, or the OS copy command (you are essentially writing a simple version of the OS copy command)).
22+
23+
- This should work for any kind of file, so you need to open
24+
the files in binary mode: ``open(filename, 'rb')`` (or ``'wb'`` for
25+
writing). Note that for binary files, you can't use ``readline()`` --
26+
lines don't have any meaning for binary files.
27+
28+
- Test it with both text and binary files (maybe a jpeg or something of your choosing).
29+
30+
- Advanced: make it work for any size file: i.e. don't read the entire
31+
contents of the file into memory at once.
32+
33+
- This should only be a few lines of code :-)
File renamed without changes.

‎source/exercises/packaging/package_lab.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
LAB: A Small Example Package
2-
============================
1+
A Small Example Package
2+
=======================
33

44
* Create a small package
55

‎source/topics/01-setting_up/index.rst‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ you need to have your computer all set up with the tools you need to do the job.
88

99
Here are some resources to getting yourself set up.
1010

11-
1211
.. toctree::
1312
:maxdepth: 1
1413

‎source/topics/02-basic_python/index.rst‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Basic Python
44
Learning a programming language is a bit of a "bootstrap" problem:
55
the best way to learn is by doing, but you need the basics in order to do anything at all. So this topic jumps right in -- if you're confused at first, just keep going and it should start to make sense.
66

7-
87
.. toctree::
98
:caption: To Read
109
:maxdepth: 1
@@ -27,5 +26,3 @@ the best way to learn is by doing, but you need the basics in order to do anythi
2726
../../exercises/grid_printer.rst
2827
../../exercises/fizz_buzz.rst
2928

30-
31-
Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
1-
Recursion and Booleans
1+
Booleans and Recursion
22
======================
33

4-
5-
To Read
6-
-------
7-
84
.. toctree::
5+
:caption: To Read
96
:maxdepth: 1
107

11-
../../modules/Recursion
128
../../modules/Booleans
9+
../../modules/Recursion
1310

14-
Activities
15-
----------
16-
17-
Exercises
18-
---------
11+
.. toctree::
12+
:caption: Activities
13+
:maxdepth: 1
1914

2015
.. toctree::
16+
:caption: Exercises
2117
:maxdepth: 1
2218

2319
../../exercises/fib_and_lucas.rst
2420

25-
26-
Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,21 @@
11
Sequences and Iteration
22
=======================
33

4-
5-
To Read
6-
-------
7-
84
.. toctree::
5+
:caption: To Read
96
:maxdepth: 1
107

118
../../modules/Sequences
129
../../modules/Iteration
1310

14-
15-
Activities
16-
----------
1711
.. toctree::
12+
:caption: Activities
1813
:maxdepth: 1
1914

2015
../../exercises/slicing.rst
2116
../../exercises/list_lab.rst
2217

23-
.. Exercises
24-
.. ---------
25-
26-
.. .. toctree::
27-
.. :maxdepth: 1
28-
29-
.. ../../exercises/xxxxx
30-
31-
18+
.. toctree::
19+
:caption: Exercises
20+
:maxdepth: 1
3221

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,23 @@
11
Basic Text Handling
22
===================
33

4-
5-
To Read
6-
-------
7-
84
.. toctree::
5+
:caption: To Read
96
:maxdepth: 1
107

118
../../modules/Strings
129

13-
Activities
14-
----------
15-
1610
.. toctree::
11+
:caption: Activities
1712
:maxdepth: 1
1813

1914
../../exercises/string_formatting.rst
2015
../../exercises/rot13.rst
2116

22-
Exercises
23-
---------
24-
2517
.. toctree::
18+
:caption: Exercises
2619
:maxdepth: 1
2720

28-
2921
../../exercises/mailroom/mailroom.rst
3022
../../exercises/mailroom/mailroom_tutorial.rst
3123

32-
33-

0 commit comments

Comments
 (0)