#setup

output = 0

negOrPos = 0

number = 0

power = 0

#functions

def posPower(output, power):

number = input("Enter your integer number: ")

power = input("Enter your power (positive): ")

power = int(power)

power = power - 1

number = int(number)

output = number

def negPower(output, power):

number = input("Enter your integer number: ")

power = input("Enter your power (negative, but don’t put a ‘-’): ")

power = int(power)

power = power - 1

number = int(number)

number = output

#interface

print(“Do you want your power to be negative or positive?”)

negOrPos = input("n = negative p = positive ")

if negOrPos == “p”:

posPower(output, power)

elif negOrPos == “n”:

negPower(output, power)

print(output)

if negOrPos == “p”:

for i in range (power):

output = output * 10

elif negOrPos == “n”:

for i in range (power):

output = output / 10

print(“Your number is”, output)

So I am trying to make a standard form to normal number converter in Python and I wrote the code above.

The variable ‘output’ always stays at 0, so my functions aren’t functioning when I call them.

Also, on forums like these I see people doing this:

How do they do this??

Thanks for helping if you do.