[Tutor] declaring a blank interger

Mike Nickey mnickey at gmail.com
Thu Oct 6 07:09:57 CEST 2011


Hey all,

I'm sorry for such a silly question but I want to declare a blank integer for x.  What I have is a base for a program that I'm working on for fun. Yes, for fun. 
The long term goal is to create a way to log items that are currently being done via pencil & paper and make this easier for me and my team.

What I am running into though is how can I declare a variable to use that is blank at start but then gets populated later on.
Here is what I have so far.

Thanks in advance

import string

#Variable declarations
UserName = string
integer x

def getUserName():
    UserName = raw_input("Enter your name: ")
    return UserName
    
def getUserNumber(x):
    x = input("Enter a number:") #This will be the users unique ID number
    return x


getUserName()
getUserNumber(x)

print UserName, x

Best,

Mike Nickey
mnickey at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111005/c8ae90b3/attachment-0001.html>


More information about the Tutor mailing list