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

37 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: practical-python-1.2
source_exercise_id: "1.2"
title: "Getting help"
section: "1.1 Python"
source_path: "01_Introduction/01_Python.md"
source_repo: "https://github.com/dabeaz-course/practical-python"
source_commit: "93dca856b41c61a0a0f85ae334116e4c125629ea"
student_visible_solution: false
has_private_solution: false
skip: 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).
## 关联来源
- [[summaries/01_Python]]