Dictionaries - Python | Lesson 13 (Free Coding Bootcamp)

preview_player
Показать описание
Free Coding Bootcamp - Go from Zero to Software Engineer

This Bootcamp will follow the roadmap covered in this video

In this lesson, we learn about dictionaries and how it can store KEY:VALUE pairs.
In addition, we also go over how to solve the practice problem from the previous lesson.

Note: Order matters for code!

🔥 Drop a comment to help the algorithm :)
👍 Subscribe to get notifications for the next video

-----------------
😎 Resources
-----------------
👯 TikTok
📸 Instagram
💬. Join the Discord
📜. FREE Resume Template
📕. FREE Note taking template

-----------------
👾 Important Videos
-----------------

-----------------
🧑🏻‍💻 About Me
-----------------
I am a full time iOS engineer, with over 7 years of programming experience.
My goal is teach you the bare minimum necessary to break into tech ASAP.

Learn more about my programming journey

I offer 1 on 1 mentorship as well, feel free to DM me on discord

#coding #bootcamp #learntocode #codewithvincent

-----------------
Chapters
-----------------
0:00 Introduction
0:27 Dictionary example
1:09 How to create a dictionary
1:47 Coding time
2:20 Get a value from a dictionary
4:15 Dictionary tips / trick with .lower()
5:12 Check if a key exists in the dictionary to avoid errors
5:52 Solution to Lesson 12's homework problem
8:05 Improve code with a dictionary

Sub count: 1,258
Рекомендации по теме
Комментарии
Автор

So glad you included the solution to the last assignment. dictionaries are great understood the lesson perfectly

txsy-system
Автор

I totally see how you did the fruit thing while watching you do it, but I couldn't figure out how to do it myself. What's the thought process going into it!??!

SinaLaJuanaLewis
Автор

at 5:46 are you just using the function so you don't get an error if the word hasn't been given a key? feels kind of pointless to do it

And at 5:00 how would you add the .lower() to multiple things, for example at 7:39 if you wrote:

print(calculateTotal(["apple", "banana", "strawberry", "pineapple"]))

where would you add the .lower() ? to all of them or is there a shorter method, i was playing around with it but couldnt seem to find where to put it without an error.

oliurrahman
Автор

hey dude so about the homework with the shop from the previous lesson how can u make the program with the input function so it would ask you which item are you buying and than it would count only the item that you inputted (sorry for my english i dont know if you will understand)

suflo
Автор

In 7:25 Why the result is 0 as and not error?

dimitmoto
Автор

its crazy how i understand everything while watching but forget when i try it on my own 😅

ryo
Автор

loving your content so far! I'm curious how would you write the homeworks code but with an input for user? I've tried so many things but I feel stuck.

JoshuaOsgood-fo
Автор

yoo, in the part where it says "check if a key exists in the dictionary to avoid errors" I dont really understand what did that code do where u typed ur names in caps and line 8 is skipped like i dont understand how it checked anything

calebtay
Автор

Awesome! Looking forward for next lesson

haymondposala
Автор

So sorry Vincent, but I've been struggling with this for a week. I get syntax error on the below line and I can't find the mistake. I hate bugging you like this but...

print(calcTotal(["apple", "banana", "raspberry", "cumquat"]))

robbyv
Автор

hey i tried the homework code but i get an (unexpected indent ) error, any help ??

taqizi
Автор

You should make a separate playlist that creates more advanced examples of these lessons but uses catchy realism. For example, "When "dictionaries" ATTACK!" haha. Like when hackers use dictionaries to bruteforce user accounts with password dictionaries. 😅😂

juancruz-b
Автор

Why does the empty list print 0 instead of item does not exist?

reubenbjornson
Автор

you explain your examples and intros well. but when its time for the actual coding you don''t really do a great job. although i get that i shouldn't be complaining cause this is a "free coding bootcamp" but sheesh

fisayoAgnbiade
Автор

Dictionaries are similar to Objects in Javascript

kishorkrishnan
join shbcf.ru