LPTHW Day 4

24 Apr 2019

Today’s Progress

Functions do 3 things:

  1. They name pieces of cod ethe way variables name strings and numbers
  2. They take arguments the way scripts take argv
  3. Using 1 and 2, you can make your own mini-scripts.
def print_one(arg1)
    print(f"arg1: {arg1}")

Thoughts: Def = define. Notice the similularity and difference between this exercise and ex13. In the previous exercises, ex13, we passed command line arguments as we called the script. In this exercise, you are introduced to python arguments, which you pass into your function as you define the function.

Link to work: exercises 18