Class 6: tuples, dicts, strings, and functions

April 10, 2020

Downloads

Session log

Luis Perez
2020-04-10 08:59:45
**Class started**
Luis Perez
2020-04-10 09:11:57
**Entering breakout rooms**
Luis Perez
2020-04-10 09:12:18
Help! We need a TA!
Luis Perez
2020-04-10 09:12:33
Share one new thing you learned from the 07_tuples-and-dicts-and-stringsnotebook? (Reply in thread.)

Zach Garrison
2020-04-10 09:28:01
you can make adjustments to a dictionary with the same commands that you would to a list

Amy Robbins
2020-04-10 09:32:25
Dictionary pairs are comprised of key-values

Benjamin Duewell
2020-04-10 09:33:32
You can have a dictionary pair be number-to-word or word-to word (sorry probably a horrible way to explain that)

Abbey Lasseigne
2020-04-10 09:33:58
Strings and tuples are similar in that they are ordered collections where you can access individual elements by indexing. Neither can be changed once they have been made.

Andrew Holston
2020-04-10 09:37:03
For dictionaries, it seems as if you can look up a value by its key, but not a key by its value.

Juan Tirado-Garcia
2020-04-10 09:37:36
Learned from Sophia that you can add “” to a word to spit out the word in dictionary

Sophia Phillips
2020-04-10 09:37:51
Elements in tuples can be called the same way as in lists.

Natanya Villegas
2020-04-10 09:38:24
I learned that you can edit existing keys in dictionaries but also define new keys using the same function.

Jessica Puente
2020-04-10 09:39:08
I learn that keys is in left side and values in on the right side in dictionaries
Luis Perez
2020-04-10 09:12:50
What should we discuss in the main session from the 07_tuples-and-dicts-and-stringsnotebook? (Reply in thread)

Amy Robbins
2020-04-10 09:32:06
How do built-in functions work within dictionaries? Can we have an example of how to use this?

Natanya Villegas
2020-04-10 09:38:50
In what case would tuples be used compared to lists?
Mike Harms
2020-04-10 09:14:28
Everyone should now be in a breakout room with other people …
Tory Herman
2020-04-10 09:22:15
could we have a TA in cosmic_caiman?

Mike Harms
2020-04-10 09:22:28
yep
Adam Fries
2020-04-10 09:28:56
It seems that we can have multiple identical keys in a dictionary, but only the 2nd (not-preceding) key gets recognized.

Mike Harms
2020-04-10 09:35:24
Actually, the second key wipes out the first
Polly Poll
2020-04-10 09:33:13
Poll by @Luis Perez
I would rate my understanding of the material in the 07_tuples-and-dicts-and-stringsnotebook as:
😱⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
🙁⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
😐⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
🙂█████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢5
😄███████████████████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢19
Polly Poll
2020-04-10 09:33:24
Poll by @Luis Perez
I would rate my understanding of the material in the 07_tuples-and-dicts-and-stringsnotebook as:
😱⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
🙁⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
😐⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
🙂█████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢5
😄████████████████████ ⁢ ⁢ ⁢ ⁢ ⁢20
Luis Perez
2020-04-10 09:41:53
**Leaving breakout rooms**
Luis Perez
2020-04-10 09:58:59
**Entering breakout rooms**
Tory Herman
2020-04-10 10:07:20
could we have a TA in cosmic_caiman?
👍1
Lila Kaye
2020-04-10 10:09:03
We would like a TA in terran_tiffany
👍1
Ben Camel
2020-04-10 10:16:04
Can we get a TA in running_rabbit?
👍1
Polly Poll
2020-04-10 10:16:49
Poll by @Mike Harms
I would rate my understanding of the material in the functionsnotebook as:
😱⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
🙁⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
😐██ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢2
🙂█████████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢9
😄█████████████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢13
Polly Poll
2020-04-10 10:25:28
Poll by @Luis Perez
I would rate my understanding of the material in the 08_functions notebookas:
😱⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
🙁⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
😐█ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢1
🙂██████████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢10
😄█████████████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢13
Luis Perez
2020-04-10 10:29:49
**Leaving breakout rooms**
Polly Poll
2020-04-10 10:32:17
Poll by @Luis Perez
I would rate my understanding of the material in the 07_tuples-and-dicts-and-stringsnotebook as:
😱⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
🙁⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
😐⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
🙂█████████████████████████25
😄⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
Polly Poll
2020-04-10 10:32:51
Poll by @Luis Perez
I would rate my understanding of the material in the 07_tuples-and-dicts-and-stringsnotebook as:
😱⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
🙁⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
😐⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ 0
🙂████████████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢12
😄████████████ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢ ⁢12
Luis Perez
2020-04-10 10:53:48
**Class ending**
Mike Harms
2020-04-10 11:28:22
I said in class I would provide an example of how to write functions and store them in a .py file so you can use them in multiple notebooks. Here’s the example. You should be able to run the notebook example-using-module.ipynb. Check out the file `my_http://module.py to see how the functions are defined. Check out the `run_from_command_http://line.py to see how to run the code from the command line.