Skip to content

Instantly share code, notes, and snippets.

@nalsi
Created November 26, 2012 19:50
Show Gist options
  • Save nalsi/4150225 to your computer and use it in GitHub Desktop.
Save nalsi/4150225 to your computer and use it in GitHub Desktop.
Multiple tasks for Lesson 1 of Mechanical Mooc
# Kai Li <--- My name
# hello_world.py <--- Name of the file
# 10/15/2012 <--- Date
# Print the pattern to the screen.
a = " | | "
b = "--------"
print a
print b
print a
print b
print a
# calculation
c = (3*5)/(2+3)
print c
d = (7+9) ** 0.5 * 2
print d
e = (4-7) ** 3
print e
f = (-19+100) ** 0.25
print f
g = 6 % 4
print g
# print the input
h = raw_input('Enter your first name: ')
i = raw_input('Enter your last name: ')
print "Enter your date of birth:"
j = raw_input('Month? ')
k = raw_input('Day? ')
l = raw_input('Year? ')
print h, i, 'was born on', j, k+',', l
# Kai Li <--- My name
# hello_world.py <--- Name of the file
# 10/15/2012 <--- Date
# Print the pattern to the screen.
a = " | | "
b = "--------"
print a
print b
print a
print b
print a
# calculation
c = (3*5)/(2+3)
print c
d = (7+9) ** 0.5 * 2
print d
e = (4-7) ** 3
print e
f = (-19+100) ** 0.25
print f
g = 6 % 4
print g
# print the input
h = raw_input('Enter your first name: ')
i = raw_input('Enter your last name: ')
print "Enter your date of birth:"
j = raw_input('Month? ')
k = raw_input('Day? ')
l = raw_input('Year? ')
print h, i, 'was born on', j, k+',', l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment