-
-
Save rafkhan/4519731 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = input("w: ") | |
b = input("h: ") | |
print a * b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = input("w: ") | |
b = input("h: ") | |
print a * b | |
a = input("w: ") | |
b = input("h: ") | |
print a * b | |
a = input("w: ") | |
b = input("h: ") | |
print a * b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calc_area(a, b): | |
c = a * b | |
return c #or you coul just return a * b | |
print calc_area(1, 3) | |
print calc_area(3, 5) | |
x = calc_area(5, 5) | |
y = calc_area(3, 2) | |
total = x + y | |
print "The total area of a 5x5 square, and a 3x2 rectangle is %d" % (total) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_area(a, b): | |
print a * b | |
print_area(23, 43) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment