Tuesday, February 25, 2020

3.1 Built-in Funcions

Lesson 3.1 - Built-in Functions and Custom Functions with no Argument

  • Functions
    • Import the random library with one line of code at the top of your script: import random
      • Read documentation on the random library here: Python random library
      • Be able to generate a random integer by calling: random.randint(x,y)
      • Be able to generate a random probability (0 <= p <= 1) by calling: random.random( )

    • Import the math library with one line of code at the top of your script:  import math

    • Define functions with no argument variable
      • Learn to call these functions changing elements
      • Know the return value of your functions

Note on multi-line lists:
The closing brace/bracket/parenthesis on multi-line constructs may line up under the first non-whitespace character of the last line of list, as in:
my_list = [1, 2, 3,
           4, 5, 6,]

     Due Wednesday February 26, 2020 :


    1.  3.1 - Reading: Math Functions, Compositions of Fns.
    2. www.google.com
    3. Do these labs on repl.it: 

    • 3.1a isPositive()
    • 3.1b isEven()
    • 3..1c minimum()


    No comments:

    Post a Comment

    Blog information move to Google Doc

    Hello All, Moving forward, please find all information about the class that you used to find on a live google doc agenda. The link is foun...