Тёмный

Python keyword arguments are awesome! 🗝️ 

Bro Code
Подписаться 2,2 млн
Просмотров 33 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 33   
@BroCodez
@BroCodez Год назад
# keyword arguments = arguments prefixed with the names of parameters # order of the arguments doesn’t matter # helps with readability # ----- EXAMPLE 1 ----- def hello(greeting, title, first, last): print(f"{greeting} {title}{first} {last}") hello("Hello", title="Mr.", last="John", first="James") # ----- EXAMPLE 2 ----- for number in range(1, 11): print(number, end=" ") print("1", "2", "3", "4", "5", sep="-") # ----- EXERCISE ----- def get_phone(country, area, first, last): return f"{country}-{area}-{first}-{last}" phone_num = get_phone(country=1, area=123, first=456, last=7890) print(phone_num)
@berneyww
@berneyww Год назад
you r the best
@DungNguyên-t2k
@DungNguyên-t2k Год назад
Chief điện thoại vivo a3 you Lam my vat cua toi la my niem cuoc doi!!!)))
@johnrhodes9964
@johnrhodes9964 Год назад
thanx to bro code, in just 5 days, I learnt enough of python to top my school in computer science exam in my high school junior year. bro is a blessing from the lord
@deralkekc7022
@deralkekc7022 4 месяца назад
Explanation and examples are way clearer and better than what my Uni Professor gives us! Great Job!
@orazovdidar
@orazovdidar 8 месяцев назад
Easy and simple explanation, thank you bro!
@AtamrarisTibia
@AtamrarisTibia Год назад
Bro, thanks to your tutorials I landed a nice job, what the hell? Thanks!
@johnsally8320
@johnsally8320 Год назад
That is awesome man! Congratulations to you!! I got into programming recently and found this playlist. If you don't mind me asking, did you do just this playlist or more stuff from BroCode for landing your job? Thanks a ton!!!
@abdulhannan-18
@abdulhannan-18 11 месяцев назад
Keyword arguments: Preceded by a keyword (the name of the argument at the time of defining the function) e.g. when something is print(), the default value for that is end=" " which we can alter by something enclosed in quotes. Similarly with sep def greeting(greeting, title, first, last): return f"{greeting} {title} {first} {last}" print(greeting("Hello", first="Bro", last="Code", title="Mr.")) Hello Mr. Bro Code def greeting(greeting, title, first, last): return f"{greeting} {title} {first} {last}" print(greeting("Hello", last="Code", title="Mr.", first="Bro")) Hello Mr. Bro Code def greeting(greeting, title, first, last): return f"{greeting} {title} {first} {last}" print(greeting("Hello", "Mr.", last="Code", first="Bro")) Hello Mr. Bro Code
@hshafe001
@hshafe001 Год назад
There is one problem with this program. If your last 4 digits is something like 0123, the zero causes the following syntax error: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers. Has anybody else run into this problem. Hopefully, in future vids this will be brought up. All - in - all, these are very good lessons. Thanks Bro Code for all the efforts you've put into these vids.
@MauricioRomanov
@MauricioRomanov Год назад
Have you tried turning the number into a string?
@samsmokes3100
@samsmokes3100 9 месяцев назад
Haha you have to make the computer read it as a integer not a string is your mistake
@heal294
@heal294 Год назад
thank you for making these videos! you are helping to so much people.
@xzex2609
@xzex2609 Год назад
spongebob squarpants =)))) god , I love his lessons , the best time I had was learning his 12 hour python lessons, I really make the most out of it it took nearly two months. now i just love o hear his voice , cause h e is going into the root of things, the best teacher i have seen in youtube, hands down
@krzysiekkrzysiek9059
@krzysiekkrzysiek9059 Год назад
Another perfect explanation. THX Bro
@Uberdurden
@Uberdurden 11 месяцев назад
excellent!
@ghostAlien44
@ghostAlien44 Год назад
You are legend bro 👽👽👽
@davidbandini3484
@davidbandini3484 Год назад
Thank you for the video!!
@zabehullahalizadeh2310
@zabehullahalizadeh2310 Год назад
Bro you are the best of the best. Thanks a million.
@WhoisZero-o1j
@WhoisZero-o1j Год назад
You are truly a bro.
@XHyperslashX
@XHyperslashX Год назад
Thank you very much!
@mohamedcoufi9873
@mohamedcoufi9873 3 месяца назад
I'm still wondering what I can do with Python
@craftrumzen2393
@craftrumzen2393 Год назад
Nice, thanks!
@bekturasanbekov1979
@bekturasanbekov1979 Год назад
thx 4 vid bro !
@saipavan77
@saipavan77 Год назад
As usual its perfect
@softwaredeveloperblog
@softwaredeveloperblog Год назад
Cool video. Thank you. I also release a video about the development
@globalcitizen1238
@globalcitizen1238 Год назад
Awesome....chad
@zephyrgaming9798
@zephyrgaming9798 Год назад
Hey bro when will you start uploading react js videos?
@ghostAlien44
@ghostAlien44 Год назад
Which Ide you are using
@navetwizer9853
@navetwizer9853 Год назад
That’s PyCharm
@Just_google_404
@Just_google_404 Год назад
Bro .y school educational system is so messed up that we are using qbasic in school
@funstories728
@funstories728 Год назад
Bro Nation
Далее
Python *ARGS & **KWARGS are awesome! 📦
14:54
Просмотров 81 тыс.
Functions in Python are easy 📞
10:38
Просмотров 531 тыс.
Физика пасты Карбонара 🧪🔬
00:57
Python default arguments are awesome! 👍
6:07
Просмотров 36 тыс.
Learn Python OOP in under 20 Minutes
18:32
Просмотров 81 тыс.
10 Crazy Python Operators That I Rarely Use
11:37
Просмотров 41 тыс.
Positional-only and keyword-only arguments in Python
9:48
25 nooby Python habits you need to ditch
9:12
Просмотров 1,8 млн
Let's code a beginner's Python BANK PROGRAM 💰
15:01
Просмотров 228 тыс.
Math in Python is easy + exercises 📐
13:51
Просмотров 110 тыс.
Python Decorators in 15 Minutes
15:14
Просмотров 448 тыс.
Python lists, sets, and tuples explained 🍍
15:06
Просмотров 295 тыс.
Физика пасты Карбонара 🧪🔬
00:57