- This event has passed.
7:30 PM – Intro To Python
August 26, 2020 @ 7:30 pm - 8:30 pm
- We finished with Function with and without return value.
- We learned how to use python random module.
- We started password generator program.
- Homework:
- Inside the Aug26_PasswordGenerator.py
- Create a function with return value “get_action”, no parameter
- Inside the function create a list, “actions”, with the following elements: “swimming”, “jumping”, “running”, “flying”, “burning”
- Use random module, to return a random action from the list.
- return the random action.
- Create a function with return value “get_fantasy_animal”, no parameter
- create a list, “animals”: “dragon”, “hydra”, “gorgon”, “kraken”, “pegasus”, “unicorn”
- use random module, to return a random animal from the list.
- return the random animal
- the homework is very similar to what we did in the class which is the “get_adjective” function.