Methods and Functions Flashcards

1
Q

What are examples of functions?

A

-they are built in

-list()
print ()
max()
min()
input()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you make your own function?

A

EXAMPLE:
def some_random_stuff():

in brakets you can give data

pass

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you do a method??

A

you do a .( and the write something

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Can you use methods and functions interchageably???

A

NO

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Who owns the method?

A

the string, methods, sets tuples connected, and are owned by an object or data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How can you know what each method is about?

A
  • search –> Python , but it isn’t exactly for beginners
    :(
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What do methods and functions do???

A

-to allow taking actions on our data types, for our programs to do something

How well did you know this?
1
Not at all
2
3
4
5
Perfectly