Six Steps to Defining a Function
1. What should your function do? Type a couple of example calls.
2. Pick a meaningful name (often a verb or verb phrase): What is a short answer to "What does
your function do"?
3. Decide how many parameters the function takes and any return values
4. Describe what your function does and any parameters and return values in the docstring
5. Write the body of the function
6. Test your function. Think about edge cases.
1. What should your function do? Type a couple of example calls.
2. Pick a meaningful name (often a verb or verb phrase): What is a short answer to "What does
your function do"?
3. Decide how many parameters the function takes and any return values
4. Describe what your function does and any parameters and return values in the docstring
5. Write the body of the function
6. Test your function. Think about edge cases.
👍6
Which of the following is correct way to define a variable in python?
Anonymous Quiz
9%
123_variable
83%
variable_123
6%
variable-1
1%
5variable-2_4
👍8❤2
👍11
Which of the following may be used to call items in dictionary my_dict with for loop?
Anonymous Quiz
29%
for key in my_dict: value = my_dict[key]
33%
for key, value in my_dict.items():
33%
All of the above
5%
None
👍7❤1
Python cheatsheet
📖 Book: https://www.pythoncheatsheet.org/
🛠 Github: https://github.com/wilfredinni/python-cheatsheet
📖 Book: https://www.pythoncheatsheet.org/
🛠 Github: https://github.com/wilfredinni/python-cheatsheet
👍2
Rich is a Python library for rich text and beautiful formatting in the terminal.
#python #library #terminal
https://github.com/Textualize/rich
#python #library #terminal
https://github.com/Textualize/rich
👍1
Introduction to Data Science by University of Washington
🎬 95 video sessions
⏰ Duration: 16h
👨🏫 Instructor: Bill Howe, PhD
✅ Completely free
Course link
#datascience #ds #ml
🎬 95 video sessions
⏰ Duration: 16h
👨🏫 Instructor: Bill Howe, PhD
✅ Completely free
Course link
#datascience #ds #ml
❤2👍1