Skip to main content

Functions 2

More Functions

  • basic anatomy of a function

  • set and call main function with multiple functions

  • setting parameters

  • passing multiple arguments

  • positional arguments

  • keyword arguments

  • default values

  • return values

  • *args

  • **kwargs

  • custom modules

  • builtin modules

  • math module

  • Chapter 2 Spreadsheet

  • Assignment 03

    • create constants
    • create variables to compare to constants
    • casting string as integer (int),
    • input, if-else
    • boolean comparison
    • output print()
    • output print() text and constants in f-string
  • Assignment 04

    • priming a while loop
    • executing a while loop
    • printing a menu
    • quitting a while loop
    • using sep="\n" (to print new lines)
    • get user input to continue loop
    • use if and elif to control chosen output
  • Assignment 05

    • working with plain text
    • html generation
    • DRY-concept via variables
    • f-strings
    • for loop,
    • for loop nested between non-repeating strings
    • simple function definition
    • python module
    • import
    • pycache
  • Functions

    • basic anatomy of a function
    • set and call main function with multiple functions
    • setting parameters
    • passing multiple arguments

Help with assignments that had issues

  • Will do this at the end of class

Video Resources

Bro Code YouTube Channel

  1. Functions in Python 10:37
  2. Default arguments 06:06
  3. Keyword arguments 06:43
  4. *ARGS & **KWARGS 14:53
  5. Modules 6:35
  6. Scope Resolution 05:33

Dave Gray YouTube Channel

  1. Functions for Beginners 15:14

Programming with Mosh

  1. Python Functions