[Python] I am a beginner

I’ve been having troubles trying to first convert the value of a key (any key 0-9) returning an integer value so I can use this value whenever I press the key.

I am supposed to make a square increase the size by the value of the key.

my code so far is:

```
def calculate_size(diameter, key):
diameter = 50
key = int(key)
diameter = diameter ** key
return diameter ** int('key')
```

Then, I have no idea how to input this function in the keyPressed function.