Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Name: Nick H
- # Section: 6.189
- # Date: June 18, 2013
- # hw1.py
- #prints "Hello World" to the screen
- print "Hello World!"
- ##### Template for Homework 1, exercises 1.2-1.5 ######
- print "********** Exercise 1.2 **********"
- print " | |"
- print "________"
- print ""
- print " | |"
- print "________"
- print ""
- print " | |"
- print "********** Exercise 1.3 **********"
- # Do your work for Excercise 1.3 here. Hint - how many different
- # variables will you need?
- print " "
- a = " | |"
- b = "________"
- c = ""
- print a
- print b
- print c
- print a
- print b
- print c
- print a
- print "********** Exercise 1.4 **********"
- print "********* Part II *************"
- from math import sqrt
- print (3*5)/(2+3)
- print sqrt(7+9) * 2
- print (4-7)**3
- print ((-19 + 100)**(1/4.0))
- print 6 % 4
- print "********* Part III *************"
- a = 4 + (6 * 4) / 2
- b = (4 + 6) * 4 / 2
- print a
- print b
Advertisement
Add Comment
Please, Sign In to add comment