Question: ```
import math
i = (2)
max = (2048)
num = (2)
while i < max:
    print(int(i))
    i *= num
    if i > max:
        i /= num
        break
if i == max:
    while i <= max:
        print(int(i))
        i /= num
        if i == round(1):
            break
        else:
            print(int(i))
            i /= num
            if i == round(1):
                break

```

I am very new to the coding scene, so I thought a good language to start from is PYTHON3!
For some odd reason, I wanted the program to print out 2 and double it up to 2048. I then wanted to print out the numbers but divided them by 2! I got what I wanted in about 1-2 hours (I know... a complete pleb.)

Since I am very new, I just wanted to see in what ways this can be shortened/improved.

Answer: 
Please do not use something like `Environment.CurrentDirectory` in Azure Functions (or actually, just anywhere) to get a temp folder. Instead use the .NET-native method to do so:

```
Path.GetTempPath()

```

So ideally use something like this:

```
string pathTradeRecFile = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + ".xlsx");

```
Environment variables as seen by an Azure Function aren't the same as the overall OS Environment variables.
See this page for how to configure them:
<https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-use-azure-function-app-settings?tabs=portal#settings>.
The System.Environment.GetEnvironmentVariable(name) call returns this value when running in Azure. Locally, the value comes from the local.settings.json file:
<https://learn.microsoft.com/en-us/azure/azure-functions/functions-dotnet-class-library?tabs=v2%2Ccmd#environment-variables>.