Skip to content

Instantly share code, notes, and snippets.

@TheBeachMaster
Created December 16, 2014 13:46
Show Gist options
  • Save TheBeachMaster/9a10c0642e3eb0267da3 to your computer and use it in GitHub Desktop.
Save TheBeachMaster/9a10c0642e3eb0267da3 to your computer and use it in GitHub Desktop.
Another Python intro for the beginner
# coding=utf-8
__author__ = 'Kennedy Otieno'
# let's create the famous hello world string. # please note you can also use sublime text editor or notepad++ as shown:
# to generate an output use the print statement
print "Hello World!!"
# lets make an input; for inputs it is proper practise you use prompts
# <- these are comments in Python.
# you must introduce a variable to store the input , I'll call mine usern
usern = raw_input(" Enter your name: ") # <- raw inut is used mainly for strings
print(usern) # <- it's that easy ☺
# let's run this baby!!
print "Hello " + usern
age = input("How old are you: ") # <- use this for numbers
print "You're :" # <= you can not concatenate strings and numerals in python
print(age)
print "Thanks for watching!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment