# Human Input

There will be programs we write that would need human input to function properly. As much as we'd like to think we know everything, we should leave it up to the user as well.

This is quite simple in Python. Let's say we'd like find out the user's name:

```python
name = input('Hello, what is your name?\n')
print('Hi {}! Nice to meet you, hope you like Python!'.format(name))
```

It's as simple as that! Note the following:

* User input is saved as a string. If you want to you to change its type you'll have convert it.
* You don't need to have a question asked to received user input, you can just call `input()` and the user could still enter data.
* Python does not put any kind of space when displaying input prompts, which is why we added the newline character ourselves.

## Exercises

1. Create a variable called `age` and prompt the user for theirs. Convert `age` into an integer, multiply it by 3 and print the result.
2. Create a python script called `rectangle_perimeter.py`, it asks the user for the rectangle's `length` and `width` and print the perimeter.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://clicktostart.gitbook.io/introduction-to-python/human-input.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
