> For the complete documentation index, see [llms.txt](https://hntech.gitbook.io/blueconda-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hntech.gitbook.io/blueconda-documentation/your-first-project-beginners/writing-some-code.md).

# Writing some Code

Now that we're ready to write some code, let's build a voting program! It will ask a user for his age and automatically tell them if they are eligible to vote or not.

Here's a challenge, try writing it yourself! But don't worry, if you can't, we'll use the code sample down here.

{% code title="Voting program" lineNumbers="true" %}

```python
age = int(input("Enter age: "))
if age >= 18:
    print("You are allowed to vote.")
else:
    print("You can't vote! Minimum age is 18.")
```

{% endcode %}

Not very challenging code! If everything goes accordingly your window will look like this:

<figure><img src="/files/ZFIhstwzmJhQXdGNtORM" alt="" width="375"><figcaption></figcaption></figure>

Remember, indentation is very important in Python. You can indent a line by using the `Tab` key.&#x20;

{% hint style="info" %}
Indentation is used in Python to show that something is nested. For example, with if statements, indentation shows the code that will run only if the condition is met. Indentation can be any number of spaces as long as you stay consistent and repeat the same indentation pattern. It is recommended to use 4 spaces.
{% endhint %}

Lets explain what all those fancy colors mean!

* Yellow: This means "keyword". These are words recognized and commonly used in Python, such as if, print, else, input.
* Green: This is for a string. A string refers to a data type that is some text. You can't do any numerical calculations with it, which is why we use the int() function to turn it into an integer for comparison.
* Dark Blue: These are numbers. We use >= 18 meaning "greater than or equals to 18".&#x20;

{% hint style="info" %}
You can use Ctrl + Z to Undo and Ctrl + Y to Redo changes you've made.
{% endhint %}

Now we've done writing our code, how do we know if its working?&#x20;

Read on!
