WEBVTT

0
00:00.470 --> 00:01.070
Hey,

1
00:01.070 --> 00:01.940
welcome back.

2
00:01.940 --> 00:05.210
It's Day 9 of 100 Days of Code.

3
00:05.390 --> 00:10.880
And today we're going to be learning more about Python Dictionaries and Nesting.

4
00:10.880 --> 00:16.370
And by the end of today you will have built a silent auction program.

5
00:16.910 --> 00:22.160
We all know that there are auctions where everybody bids and you can see everybody else's bid, and

6
00:22.160 --> 00:25.130
the auctioneer gets you to bid higher, and higher values.

7
00:25.340 --> 00:31.760
Now there's also a type of auction called a Silent Auction, where everybody bids silently, and no one

8
00:31.760 --> 00:39.340
knows the other person's bid until at the very end of the auction, where the highest bid is revealed.

9
00:39.370 --> 00:41.140
That's what we're going to be building.

10
00:41.140 --> 00:46.600
And if you want to check out the final program, you can head over to this URL right here.

11
00:46.600 --> 00:47.620
And here,

12
00:47.620 --> 00:53.530
you'll not only see this amazing gavel built out of ASCII but also the secret auction program.

13
00:53.530 --> 00:55.090
So here's how it works.

14
00:55.090 --> 00:59.710
Let's say that I'm going to be the first person logging on to the program.

15
00:59.710 --> 01:02.540
I'm going to give my name and my bid.

16
01:02.540 --> 01:06.710
Let's say I'm going to bid, uh, $53 for this item.

17
01:06.710 --> 01:11.360
And once I'm done with my bid, it asks me whether if there are any other bidders.

18
01:11.360 --> 01:19.160
So if I type yes, then the screen clears and I can hand over the laptop to the next person who's going

19
01:19.160 --> 01:20.300
to make their bid.

20
01:20.300 --> 01:26.180
So let's say there's James, who's going to bid even less than I did.

21
01:26.180 --> 01:33.130
And then he's going to make way for the final bidder, who is going to bid $121.

22
01:33.130 --> 01:37.720
So now at this stage, if everybody is done, then we type, 'no'.

23
01:37.720 --> 01:45.040
And it's going to now tally up all the bids and figure out who bid the highest and give us a winner,

24
01:45.070 --> 01:46.480
printing out, "The winner is

25
01:46.480 --> 01:49.390
Jenny with a bid of $121."

26
01:49.600 --> 01:54.550
There's a number of places that you could use this if you were auctioning some piece of art, or if

27
01:54.550 --> 01:59.150
you're trying to outbid your brothers and sisters on who gets to go on the trampoline.

28
01:59.150 --> 02:02.930
Or if you're trying to start an auction with your friends or coworkers.

29
02:02.960 --> 02:05.600
The silent auction has many, many uses.

30
02:06.110 --> 02:06.590
All right.

31
02:06.590 --> 02:11.030
In today's lessons, we're going to be focusing mostly on the Python Dictionary.

32
02:11.030 --> 02:17.480
But in addition, we're also going to look at how we can nest, say, lists, inside lists or dictionaries,

33
02:17.480 --> 02:21.560
inside dictionaries, and also mixing lists and dictionaries as well.

34
02:21.740 --> 02:26.120
Once you're ready, head over to the next lesson and let's get started with the day.