Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Python keyword arguments are awesome! ๐Ÿ—๏ธ
Play lesson

Python tutorial for beginners ๐Ÿ - Python keyword arguments are awesome! ๐Ÿ—๏ธ

4.0 (0)
8 learners

What you'll learn

This course includes

  • 14.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

#python #tutorial #course 00:00:00 example 1 00:03:20 example 2 00:04:36 exercise 00:06:19 conclusion # 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)

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere