# Accepting Input from User

### Basic way of accepting input:

```python
input('Please enter your name: ') # Asks user to enter their name
```

### To use that data:

```python
name = input('Please enter your name: ')
print("Hello there " + name)
```

### To prevent the variable from containing the extra spaces:

```python
name = input('Please enter your name: ')
print("Hello there " + name.strip()) # Strip removes spaces
```

* Anything that the user types as input it will be taken as a `STRING` even if it is a number

### To do math:

```python
number = input('Enter your number: ')
print(5 + int(number))
```


---

# 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://docs.arkannis.net/programming/courses/python-pcap-31-03-course/control-flow/accepting-input-from-user.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.
