Files
coding-mentor-agent/kb/python-course-kb-practical-python/wiki/exercises/1-2-getting-help.md
T

1.2 KiB
Raw Blame History

id, source_exercise_id, title, section, source_path, source_repo, source_commit, student_visible_solution, has_private_solution, skip
id source_exercise_id title section source_path source_repo source_commit student_visible_solution has_private_solution skip
practical-python-1.2 1.2 Getting help 1.1 Python 01_Introduction/01_Python.md https://github.com/dabeaz-course/practical-python 93dca856b41c61a0a0f85ae334116e4c125629ea false false false

Exercise 1.2: Getting help

Source: Practical Python Programming, 01_Introduction/01_Python.md.

Exercise 1.2: Getting help

Use the help() command to get help on the abs() function. Then use help() to get help on the round() function. Type help() just by itself with no value to enter the interactive help viewer.

One caution with help() is that it doesn’t work for basic Python statements such as for, if, while, and so forth (i.e., if you type help(for) you’ll get a syntax error). You can try putting the help topic in quotes such as help("for") instead. If that doesn’t work, you’ll have to turn to an internet search.

Followup: Go to https://docs.python.org/3/ and find the documentation for the abs() function (hint: it’s found under the library reference related to built-in functions).

关联来源