Bakery
Assignments
Back to all courses
Default Scratchpad Last modified at 2:47AM on Sat 15, Oct 2022 |
You may write whatever you want here. It will not be graded. | |
1) Introduction Primer | ||
1) Primer Reading Last modified at 1:43PM on Sat 26, Aug 2023 |
# Introduction to the Book  Hello, and welcome to the world of... | |
1A) Introduction | ||
1A1) Computer Science Last modified at 2:55PM on Tue 12, Jul 2022 |
4 questions | |
1A1) Computer Science Reading Last modified at 1:52PM on Sat 26, Aug 2023 |
## What is "Computer Science"?  Computer Science is not really about computers, and it is not really a science. Instead, Computer... | |
1A2) Programming Last modified at 2:55PM on Tue 12, Jul 2022 |
9 questions | |
1A2) Programming Reading Last modified at 1:53PM on Sat 26, Aug 2023 |
## What is a Programming Language?  Programs are created by writing instructions in a _programming language_, like how movie scripts are written... | |
1A3) Console I/O Last modified at 2:55PM on Tue 12, Jul 2022 |
5 questions | |
1A3) Console I/O Reading Last modified at 1:53PM on Sat 26, Aug 2023 |
## Phases of a Program 1. Input 2. Processing 3. Output Every program has three main phases. First, input data is given to the program. Second, the data is processed. Third, the data is output in some way to the user. _Inputs_ and _Outputs_ are how... | |
1A3.1) Basic Output Last modified at 6:35PM on Sun 28, Aug 2022 |
The code below is printing the message `"Hello world."` Change the message so that it instead prints `"Python is great!"` | |
1A3.2) Now You Print Last modified at 9:24PM on Thu 20, Apr 2023 |
Now you will write your own Python program. Drag the PRINT block in the "Output' category and the green STRING LITERAL block in the "Values" category onto the canvas in order to print the phrase `"This is programming!"`. Be sure to observe the... | |
1A4) Values Last modified at 2:55PM on Tue 12, Jul 2022 |
5 questions | |
1A4) Values Reading Last modified at 1:56PM on Sat 26, Aug 2023 |
## Values Represent the World  Programming is all about inputting data so that we can manipulate it to get some output. Therefore, we use values to... | |
1A5) Types Last modified at 11:14PM on Tue 30, Aug 2022 |
6 questions | |
1A5) Types Reading Last modified at 4:51PM on Tue 13, Feb 2024 |
## The Basic Types * `143`: Integer * `44.07`: Float * `"This is a string"`: String * `True`: Boolean * `None`: None All values in Python have a type. The five basic types are: integer, float, string, Boolean, and None. There are many other... | |
1A6) Math Last modified at 2:55PM on Tue 12, Jul 2022 |
7 questions | |
1A6) Math Reading Last modified at 1:57PM on Sat 26, Aug 2023 |
## Computers Are Good at Math  In some ways, computers are just large machines for doing math. Computers are very, very good at doing math. In fact, modern computers can perform billions or... | |
1A7) Logic Last modified at 2:55PM on Tue 12, Jul 2022 |
3 questions | |
1A7) Logic Reading Last modified at 1:57PM on Sat 26, Aug 2023 |
## Purpose - **Comparison operator:** Asks a question about two numbers' relationship. - **Boolean operator:** Asks a question about other comparisons. One of the major reasons that programs are useful is because they can do different things... | |
1A8) Interactive Evaluation Last modified at 7:30PM on Wed 10, Aug 2022 |
5 questions | |
1A8) Interactive Evaluation Reading Last modified at 1:57PM on Sat 26, Aug 2023 |
## Expressions ```python example-expressions # Literal values are expressions print(5) print(10.0) print(True) print("Hello") # Math operations are expressions print(1 + 2) print(4 - 5) print(8 / 4) # Boolean operators are expressions print(5 >... | |
1B) Introduction | ||
1B1) Variables Last modified at 2:55PM on Tue 12, Jul 2022 |
4 questions | |
1B1) Variables Reading Last modified at 2:01PM on Sat 26, Aug 2023 |
## Purpose ```python example-variables cakes_needed = 4 cups_sugar = cakes_needed * 2 eggs = cakes_needed * 4 cups_flour = cakes_needed * 3 ingredients = cups_sugar + eggs + cups_flour print("You need", ingredients, "ingredients.") ``` Variables let... | |
1B2) Tracing Last modified at 2:55PM on Tue 12, Jul 2022 |
3 questions | |
1B2) Tracing Reading Last modified at 7:05PM on Fri 8, Sep 2023 |
## Reading and Writing Variables ```python variable-reading-writing # Writing variables my_int_variable = 5 my_str_variable = "hello" my_bool_variable = True # Reading variables (and printing... | |
1B3) Modules Last modified at 2:55PM on Tue 12, Jul 2022 |
5 questions | |
1B3) Modules Reading Last modified at 2:03PM on Sat 26, Aug 2023 |
## Sequential Execution ```python step-by-step count = 0 # Step 1 print(count) # Step 2 count = count + 5 # Step 3 count = count + 2 # Step 4 print(count) # Step 5 ``` Programs execute line by... | |
1B4) Comments Last modified at 7:48PM on Wed 10, Aug 2022 |
6 questions | |
1B4) Comments Reading Last modified at 2:03PM on Sat 26, Aug 2023 |
## Code is Confusing  Code can be confusing. There's no way around it. Figuring out what a program does is often just as hard as writing the code... | |
1B5) Importing Last modified at 2:55PM on Tue 12, Jul 2022 |
4 questions | |
1B5) Importing Reading Last modified at 2:03PM on Sat 26, Aug 2023 |
## Modules * Modules are Python Programs Whenever you create a new Python program, you are creating a _module_. In other words, a module is just a Python program. A module is useful, however, because it can be imported into another module. Any... | |
1B6) Strings Last modified at 2:55PM on Tue 12, Jul 2022 |
4 questions | |
1B6) Strings Reading Last modified at 2:04PM on Sat 26, Aug 2023 |
## Purpose ```python example-strings name = "Ada Bart" word = "rubber" book = "Dante's Inferno" website = "https://wikipedia.org" ``` Strings are how we put text data into a computer. Any text data can be a string: names, words, books, web... | |
1B7) String Operations Last modified at 2:55PM on Tue 12, Jul 2022 |
7 questions | |
1B7) String Operations Reading Last modified at 3:38PM on Fri 30, Aug 2024 |
## What are the operations? * Addition * Comparisons * Membership * Slicing * Subscripting * Indexing Strings have several operators that can be used on them, just like integers or Booleans. In fact, they have some special operators we haven't... | |
1B8) Errors Last modified at 2:55PM on Tue 12, Jul 2022 |
4 questions | |
1B8) Errors Reading Last modified at 2:05PM on Sat 26, Aug 2023 |
## Purpose  When something goes wrong with your program, Python will give you an error message. These messages are meant to help you find where... | |
2) Functions Primer | ||
2) Primer Last modified at 2:31AM on Sun 3, Sep 2023 |
# Functions ## Introduction to Functions * Functions: Reusable chunks of code that can be used to build up more complicated programs. Functions are one of the most important concepts in this entire book, so we start off with them here in the second... | |
2A) Functions | ||
2A1) Calling Functions Last modified at 2:55PM on Tue 12, Jul 2022 |
6 questions | |
2A1) Calling Functions Reading Last modified at 2:40AM on Sun 3, Sep 2023 |
## What Are Functions? * Functions: Reusable chunks of code Functions are reusable chunks of code. Once code is wrapped in a function, we can use it in other places. First, we'll learn how to use functions. Later, we'll learn how to make them. ##... | |
2A2) Built-in Functions Last modified at 2:55PM on Tue 12, Jul 2022 |
7 questions | |
2A2) Built-in Functions Reading Last modified at 2:40AM on Sun 3, Sep 2023 |
## The Many Functions - **`abs`:** Calculate the absolute value of a number - **`bool`:** Convert a value to a Boolean - **`int`:** Convert a value to an integer - **`pow`:** Raise a number to the power of another number - **`len`:** Determine the... | |
2A3) Defining Functions Last modified at 2:55PM on Tue 12, Jul 2022 |
11 questions | |
2A3) Defining Functions Reading Last modified at 2:41AM on Sun 3, Sep 2023 |
## Defining Your Own Functions  You can create your own functions in Python. In fact, this is one of the most powerful features of programming — the ability to... | |
2A4) Function Checklist Reading Last modified at 4:31PM on Wed 10, Aug 2022 |
# Defining Functions Checklist When you are struggling to define a function, it helps to have a plan. You might want to print this page out and keep it by your side. Write the parts of the function in this order: 1. **Function Header**: Have you... | |
2A5) Testing Functions Last modified at 3:10PM on Thu 3, Oct 2024 |
7 questions | |
2A5) Testing Functions Reading Last modified at 2:43AM on Sun 3, Sep 2023 |
## Unit Tests * Find problems earlier. * Make it easier to change things later. * Have more confidence in gluing together code. Once you've created a function, how do you know if it is correct? You could carefully read over the function, but you... | |
2A6) Debugging Functions Last modified at 2:55PM on Tue 12, Jul 2022 |
2 questions | |
2A6) Debugging Functions Reading Last modified at 2:44AM on Sun 3, Sep 2023 |
## What is Debugging? ![On the left, a picture of an actual insect (a bug) taped to a piece of paper that reads "(moth) in relay, First actual case of bug being found". On the right, a picture of [Admiral Grace... | |
2B) Functions | ||
2B1) Scopes and Bodies Last modified at 2:55PM on Tue 12, Jul 2022 |
10 questions | |
2B1) Scopes and Bodies Reading Last modified at 3:11PM on Thu 3, Oct 2024 |
## Bodies and Scopes * Body: An indented region of code. * Scope: A region describing the lifetime of a variable. Two related but distinct ideas are Bodies and Scopes. Programs have both bodies and scopes, and so do functions. But scope and bodies... | |
2B2) Docstrings Last modified at 2:55PM on Tue 12, Jul 2022 |
6 questions | |
2B2) Docstrings Reading Last modified at 2:45AM on Sun 3, Sep 2023 |
## Why Document Code? 1. For sharing code, 2. To organize our current code, and 3. To make re-reading old code easier Programmers write documentation to explain what a function does. This is useful not only for sharing code with other programmers,... | |
2B3) Function Flow Last modified at 2:55PM on Tue 12, Jul 2022 |
6 questions | |
2B3) Function Flow Reading Last modified at 2:45AM on Sun 3, Sep 2023 |
## Scope and Values 1. Variables inside a function cannot be used outside. 2. Variables outside a function should not be used inside. 3. Function return values, not variables. Previously, we learned about scope: the idea that variables inside a... | |
2B4) External Functions Last modified at 7:58PM on Thu 18, Aug 2022 |
6 questions | |
2B4) External Functions Reading Last modified at 2:47AM on Sun 3, Sep 2023 |
## Why External Functions ```python try-randint from random import randint # Each of these prints a random number! print(randint(0, 100)) print(randint(0, 100)) print(randint(0, 100)) print(randint(0, 100)) ``` We have previously used `import`... | |
3) If Statements Primer | ||
3) Primer Reading Last modified at 1:32PM on Sun 10, Sep 2023 |
## Introduction to `if` statements * `if` statement: a body of code that is executed based on a condition Almost as fundamental to programming as the function, `if` statements let us make our programs smarter. They let code do different things based... | |
3A) If Statements | ||
3A1) If Statements Last modified at 2:55PM on Tue 12, Jul 2022 |
6 questions | |
3A1) If Statements Reading Last modified at 2:17AM on Sun 10, Sep 2023 |
## The Idea of If Statements ![A box labelled "IF ___" has two arrows coming out. One arrow points to a box labelled "THEN do A" and another arrow points to another box labelled "THEN do B". Both of those boxes have arrows that converge on a fourth... | |
3A2) Truthiness Last modified at 8:48PM on Sun 11, Sep 2022 |
37 questions | |
3A2) Truthiness Reading Last modified at 2:18AM on Sun 10, Sep 2023 |
## What is Truthiness - **Truthiness:** The ability to use any type of value as a conditional, not just Booleans. Unlike some languages, Python does not require that `if` statements have Boolean expressions in their conditional. This may seem... | |
3B) If Statements | ||
3B1) Nested If Statements Last modified at 2:55PM on Tue 12, Jul 2022 |
5 questions | |
3B1) Nested If Statements Reading Last modified at 2:19AM on Sun 10, Sep 2023 |
## Nesting ```python age-price-example age = 22 cost = 45 if age > 21: if cost < 10: print("Buy") else: print("Too expensive") else: print("Too young") ``` A program is made up of a sequence of statements known as a... | |
3B2) Logical Patterns Last modified at 8:17PM on Wed 10, Aug 2022 |
7 questions | |
3B2) Logical Patterns Reading Last modified at 2:20AM on Sun 10, Sep 2023 |
## Logical Patterns - And vs. Nested If - Defensive Guard - Early Return - Multiple Return Spots - Build-Up-Return - Define-and-Refine Since `if` statements are so useful, they can be a little overwhelming when you get started. This lesson gives... | |
3B3) Events Last modified at 1:22PM on Sun 11, Sep 2022 |
7 questions | |
3B3) Events Reading Last modified at 2:20AM on Sun 10, Sep 2023 |
## Events * Normal: Start, Execute, End * Interactive: Start, Events -> Output, Never End! So far, most of our programs have been straightforward: the program is started, execution occurs, and then the program ends naturally. But most programs that... | |
4) Data Structures Primer | ||
4) Primer Reading Last modified at 3:17PM on Thu 29, Feb 2024 |
## Introduction to Data Structures * Lists: A new type that can hold multiple values of the same type. * Dataclasses: A way of making new types that combine multiple bits of different kinds of data into one bundle. Previously, we have learned about... | |
4A) Data Structures | ||
4A1) Dataclasses Last modified at 8:10PM on Wed 24, Aug 2022 |
6 questions | |
4A1) Dataclasses Reading Last modified at 1:09PM on Sun 10, Sep 2023 |
## Primitives Types * Boolean * Integer * Float * String * None We have learned about 5 primitive types: Booleans, Integers, Floats, Strings, and the special None. We can use these to represent many kinds of data, but they have a limitation since... | |
4A2) Using Dataclasses Last modified at 12:53PM on Sun 10, Sep 2023 |
3 questions | |
4A2) Using Dataclasses Reading Last modified at 1:08PM on Sun 10, Sep 2023 |
## Invalid Dataclass Operations ```python dataclass-invalid-operations from dataclasses import dataclass @dataclass class Circle: radius: int color: str red_circle = Circle(5, "red") blue_circle = Circle(5, "blue") # All of these cause an... | |
4A3) Returning Dataclasses Reading Last modified at 4:07PM on Tue 19, Sep 2023 |
## Functions Returning Dataclasses ```python returning-dataclasses from dataclasses import dataclass from bakery import assert_equal @dataclass class Card: suit: str rank: int def parse_card(card: str) -> Card: return Card(card[0],... | |
4A4) Worlds Last modified at 12:24PM on Sun 10, Sep 2023 |
2 questions | |
4A4) Worlds Reading Last modified at 1:08PM on Sun 10, Sep 2023 |
## Basic Designer Games ```python designer-object-fields from designer import * def the_pie_flies_right(pie: DesignerObject): pie.x += 4 when('updating', the_pie_flies_right) start(emoji("pie", 0)) ``` We have previously used Designer to make... | |
4B) Data Structures | ||
4B1) Lists Last modified at 8:12PM on Wed 24, Aug 2022 |
7 questions | |
4B1) Lists Reading Last modified at 1:12PM on Sun 10, Sep 2023 |
## Lists ```python list-examples # List of integers print([45, 55, 32]) # List of strings print(["Apples", "Oranges", "Bananas"]) # List of booleans print([True, False, True]) # Empty List print([]) ``` The next data structure we will learn about... | |
4B2) List Operations Last modified at 2:55PM on Tue 12, Jul 2022 |
5 questions | |
4B2) List Operations Reading Last modified at 1:13PM on Sun 10, Sep 2023 |
## Doing Stuff with Lists * Indexing * Subscripting * Equality Test * Membership Test * Appending * Popping Lists are very similar to strings, and many of the operations you can do on a string you can do on a list. In particular, the slicing and... | |
4B3) Mutability Last modified at 2:55PM on Tue 12, Jul 2022 |
3 questions | |
4B3) Mutability Reading Last modified at 1:15PM on Sun 10, Sep 2023 |
## What is Mutability? - Mutability: The value itself can change. - Immutability: Only new values can be produced, based on that value. Mutability is an important concept now that we have more advanced data structures. Fundamentally, the idea is... | |
6) For Loops Primer | ||
6) Primer Reading Last modified at 8:16PM on Sat 16, Sep 2023 |
## Introduction to For Loops ```python simple-loop names = ["Ada", "Babbage", "Captain"] for name in names: print(name) ``` Writing the same code over and over again, in order to do something multiple times, is tedious and likely to lead to... | |
6A) For Loops | ||
6A1) For Loops Last modified at 7:20PM on Wed 13, Jul 2022 |
5 questions | |
6A1) For Loops Reading Last modified at 2:04PM on Sun 10, Sep 2023 |
## Doing Things Multiple Times ```python for-loop-example costs = [100, 25, 25, 50, 10] # Without FOR loops print(costs[0]) print(costs[1]) print(costs[2]) print(costs[3]) print(costs[4]) # With FOR loops! for a_cost in costs: ... | |
6A2) For Loop Patterns 1 Last modified at 7:20PM on Wed 13, Jul 2022 |
5 questions | |
6A2) For Loop Patterns 1 Reading Last modified at 2:05PM on Sun 10, Sep 2023 |
## Many Loop Patterns - **Count:** For counting the number elements in a list. - **Sum:** For adding up a list of numbers. - **Accumulate:** For combining a list of strings or a list of Booleans. - **Map:** For transforming the elements of a list. -... | |
6B) For Loops | ||
6B1) For Loop Patterns 2 Last modified at 8:14PM on Thu 23, Mar 2023 |
5 questions | |
6B1) For Loop Patterns 2 Reading Last modified at 2:13PM on Thu 3, Oct 2024 |
## Even More Loop Patterns - **Find:** Get the first/last element that matches a condition. - **Take:** Keep all the elements until they match a condition. - **Min/max:** Find the highest or lowest element in a list. We've already seen the sum,... | |
6B2) Loop Composition Last modified at 8:12PM on Thu 23, Mar 2023 |
4 questions | |
6B2) Loop Composition Reading Last modified at 5:18PM on Mon 30, Sep 2024 |
## Directly Looping in Functions ```python direct-average def average(nums: list[int]) -> float: total = 0 count = 0 for num in nums: total = total + num count = count + 1 return total / count print(average([1, 4,... | |
7) Sequences Primer | ||
7) Primer Reading Last modified at 3:20PM on Wed 4, Oct 2023 |
## Using Indexes ```python values = [7, 4, 6, 5, 3, 9] print(values) # Update value at index values[1] = 7 print(values) ``` Lists have been a powerful addition to our toolkit, along with loops for processing them. But back when we first started... | |
7A) Sequences | ||
7A1) Lists and Indexes Last modified at 4:13PM on Wed 31, May 2023 |
8 questions | |
7A1) Lists and Indexes Reading Last modified at 2:14PM on Sun 10, Sep 2023 |
## Lists and Indexes ```python list-elements values = [10, 10, 20, 1, 5] #indexes: 0, 1, 2, 3, 4 # also: -5, -4, -3, -2, -1 print("First is", values[0]) print("Third is", values[2]) print("Last is", values[-1]) ``` So far, we have iterated... | |
7A2) String Iteration Last modified at 2:22PM on Fri 9, Sep 2022 |
3 questions | |
7A2) String Iteration Reading Last modified at 2:14PM on Sun 10, Sep 2023 |
## Processing a String ```python string-iteration word = "Hello" for character in word: print(character) ``` Lists and strings are somewhat similar since they are both a sequence of things. Strings are sequences of characters, but lists can be... | |
7B) Sequences | ||
7B1) Filesystems Last modified at 4:09PM on Sat 20, Aug 2022 |
8 questions | |
7B1) Filesystems Reading Last modified at 2:15PM on Sun 10, Sep 2023 |
## A System of Files ![A picture modeling someone's file system. At the top is a folder labeled "root", with three arrows pointing downwards at three other folders. The first folder is labeled "School work" and has two files below (a word document... | |
7B2) Files Last modified at 4:09PM on Sat 20, Aug 2022 |
5 questions | |
7B2) Files Reading Last modified at 1:08PM on Sun 15, Oct 2023 |
## Files ![A picture representing a file is shown, as a document with a filename below it. The filename reads `"Count-of-monte-cristo.txt"`. The document has some text in it that is clearly very... | |
8) Nesting Data Primer | ||
8) Primer Reading Last modified at 2:46AM on Fri 13, Oct 2023 |
## Lists of Dataclasses ```python list-of-dc from dataclasses import dataclass @dataclass class Picture: width: int height: int filename: str pictures = [ Picture(256, 256, "cool_dog.png"), Picture(128, 512, "family_photo.png"), ... | |
8A) Nesting Data | ||
8A1) Lists of Dataclasses Last modified at 2:02PM on Mon 17, Oct 2022 |
4 questions | |
8A1) Lists of Dataclasses Reading Last modified at 5:03PM on Wed 16, Oct 2024 |
## Lists and Dataclasses * Lists: A sequence of data, accessible in order, all of the same type * Dataclasses: A bundle of data, accessible by field name, composed of many possible types Recall our two composite data types that we have learned so... | |
8A2) Nested Dataclasses Last modified at 3:24AM on Thu 8, Dec 2022 |
5 questions | |
8A2) Nested Dataclasses Reading Last modified at 2:17PM on Sun 10, Sep 2023 |
## Nesting Dataclasses ```python nesting-example from dataclasses import dataclass @dataclass class Address: city: str state: str @dataclass class Person: name: str work: Address home: Address ada = Person("Ada",... | |
8B) Nesting Data | ||
8B1) Nested Lists Last modified at 9:53PM on Thu 22, Sep 2022 |
5 questions | |
8B1) Nested Lists Reading Last modified at 2:18PM on Sun 10, Sep 2023 |
## Lists of Lists ```python list-of-lists numbers = [ [1, 2, 3, 5, 6], [7, 8, 9, 10, 11], [12, 13, 14, 15, 16], [17, 18, 19, 20, 21], ] # Entire nested list print(numbers) # Third row of values print(numbers[2]) # First row, second column's... | |
8B2) Heavily Nested Data Last modified at 4:04PM on Fri 18, Oct 2024 |
11 questions | |
8B2) Heavily Nested Data Reading Last modified at 2:18PM on Sun 10, Sep 2023 |
## The Types * **Primitive Types**: Integer, float, Boolean, string, None * **Composite Types**: List, dataclasses The five primitive types we've learned about are integer, float, Boolean, string, and `None`. The two composite types we've seen so... | |
10A) While | ||
10A1) While Loops Last modified at 6:13PM on Sat 8, Apr 2023 |
10 questions | |
10A1) While Loops Reading Last modified at 2:19PM on Sun 10, Sep 2023 |
## Another Kind of Iteration ```python while condition: pass ``` `for` loops allow us to iterate through each element of a list. They are the most common form of iteration in Python. However, there is another kind of iteration that is useful... | |
10A2) While Loop Patterns Last modified at 6:14PM on Sat 8, Apr 2023 |
4 questions | |
10A2) While Loop Patterns Reading Last modified at 2:19PM on Sun 10, Sep 2023 |
## While Patterns - Numeric While - User Input Loop - Do-Until Loop - Read-Evaluate-Print-Loop - Main Game/Server Loop - Random Looping - List While We have seen several loop patterns related to `for` loops. This time, we will see general patterns... | |
10B) Plotting | ||
10B1) Plotting Reading Last modified at 2:20PM on Sun 10, Sep 2023 |
## Visualizations  When you have a large amount of data, you can create visualizations to get a... | |
11) Time and Trees Primer | ||
10) Primer Last modified at 2:52PM on Wed 30, Oct 2024 |
## While Loops ```python while-loop-example command = input("Type EXIT to stop.") while command != "EXIT": command = input("Type EXIT to stop.") print("You typed EXIT") ``` We previously learned how `for` loops can iterate through a list of... | |
11A) Time | ||
11A1) Time Complexity Last modified at 6:18PM on Sat 8, Apr 2023 |
4 questions | |
11A1) Time Complexity Reading Last modified at 2:21PM on Sun 10, Sep 2023 |
## Questioning a Program - Is the program **correct**? - Is the program **readable**? - Is the program **fast**? Effective computer scientists try to make the best programs they can, and to do so they must ask reflective, critical questions about... | |
11A2) Sorting Last modified at 6:18PM on Sat 8, Apr 2023 |
8 questions | |
11A2) Sorting Reading Last modified at 2:21PM on Sun 10, Sep 2023 |
## Sorting and Searching - **Sorting:** Putting elements in ascending order - **Searching:** Finding a specific element in a list In this chapter, we will be looking at sorting and searching, two important operations on a list. These operations have... | |
11B) Trees | ||
11B1) Recursion and Trees Last modified at 7:22PM on Mon 14, Nov 2022 |
4 questions | |
11B1) Recursion and Trees Reading Last modified at 2:22PM on Sun 10, Sep 2023 |
## Defining Recursion - **Recursion:** A process in which the result of each repetition is dependent upon the result of the next repetition. - If you still don't understand, go see the definition of recursion. Recursion is another approach to... |