Functions in python 3
<p>I'm struggling with functions in python 3. How can I make the below code print out the result in degrees Celsius? Is the indentation wrong, or has it to do with me not defining Celsius outside the function in the first place? Does this mean I do not have to use functions for simple tasks or is it better to do so anyway?</p>

<pre><code>print ("Welkom bij mijn Fahrenheit naar Celsius converteerprogramma!")

fahrenheit = int(input("Voer aantal graden Fahrenheit in "))

def converter_fahrenheit(fahrenheit):
    celsius = (fahrenheit - 32) * 5/9
print (fahrenheit, "graden Fahrenheit is omgerekend ","%.2f" % celsius,"graden Celsius")
</code></pre>

<p>You can do this by defining your function <code>converter_fahrenheit()</code> first then taking the input and finally calling the function after having the input. You haven't called the function to get the value of <code>celsius</code> and it's the main issue.
The code should be like in this way:</p>

<pre><code>def converter_farenheit(farenheit):
        celsius=(farenheit-32)*5/9
        print(farenheit,"is the temperature in farenheit and in Celsius ","%.2f" %celsius)
converter_farenheit(farenheit=int(input("Enter the temperature in Farenheit ")))
</code></pre>

<p>Please mark the indentation well too. :)</p>

python