I'm just starting out with Python.I'm making a basic calculator. When I input a number ,I have to do it like this :
Number= int(input("Enter your number"))
And I was thinking if I could make a function ,like this:
def inputting (Number):
Number= int(input("Enter your number")
And then call it whenever inputting.But I have to define a variable before I use it in a function,and that can only be done by assigning a value. And instead of the value entered , it takes the value previously assigned when I use it later.
def inputting (Number):
Number= int(input("Enter your number")
FirstNum= none
inputting(FirstNum)
print (FirstNum)
and instead of printing the value I'd typed in there, it just prints none How do I make this work?