Methods and Functions Flashcards
1
Q
What are examples of functions?
A
-they are built in
-list()
print ()
max()
min()
input()
2
Q
How do you make your own function?
A
EXAMPLE:
def some_random_stuff():
in brakets you can give data
pass
3
Q
How do you do a method??
A
you do a .( and the write something
4
Q
Can you use methods and functions interchageably???
A
NO
5
Q
Who owns the method?
A
the string, methods, sets tuples connected, and are owned by an object or data type
6
Q
How can you know what each method is about?
A
- search –> Python , but it isn’t exactly for beginners
:(
7
Q
What do methods and functions do???
A
-to allow taking actions on our data types, for our programs to do something