-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelp!.py
21 lines (18 loc) · 961 Bytes
/
help!.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'''
Help!
50xp
Maybe you already know the name of a Python function, but you still have to figure out how to use
it. Ironically, you have to ask for information about a function with another function: help().
In IPython specifically, you can also use ? before the function name.
To get help on the max() function, for example, you can use one of these calls:
help(max)
?max
Use the Shell on the right to open up the documentation on complex(). Which of the following
statements is true?
Possible Answers
complex() takes exactly two arguments: real and [, imag].
complex() takes two arguments: real and imag. Both these arguments are required.
complex() takes two arguments: real and imag. real is a required argument, imag is an optional argument.
complex() takes two arguments: real and imag. If you don't specify imag, it is set to 1 by Python.
'''
# complex() takes two arguments: real and imag. real is a required argument, imag is an optional argument.