I'm returning to college after a 21-year absence and am starting fresh in a science stream. My first course in January will be the introductory Python course. In the meantime, I'm doing the Codeacademy tutorials and have completed the basic ones on variables, strings, comments, conditionals, some functions, and a few other things. I also did a little project that's part of a tutorial section wrapup.
I took the time to write my first-ever independent script using the eric4 IDE in Linux Mint 14. I'm including the (very short) script in this post in case anyone has any kind, neutral or even nasty comments for me. I welcome all input.
#Prints welcome and asks for user input
print "Welcome to Miki's First Toy!"
print "This program tells you how long something you typed is."
variable = raw_input("Please type something in and hit enter: ")
#Determines if input is numeric and, if necessary, converts it to a string
if variable.isalpha() == False:
print ""
else:
variable = str(variable)
print ""
#Obtains length, provides it to user and exits
variable = str(len(variable))
print "What you typed is " + variable + " characters long."
print "Have a nice day!"
Regards,
Miki