Last active
August 29, 2015 14:17
-
-
Save le717/d1336a599712958de552 to your computer and use it in GitHub Desktop.
I have no clue what younger me was trying to do. At all. File dated January 9, 2013.
This file contains 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 circle_info(Peri, Area): | |
if select == "Area": | |
area_of_circle(rad) | |
elif select == "Peri": | |
peri_of_circle(rad) | |
else: | |
print("Sorry, invalid selection.") | |
def area_of_circle(rad): | |
return (3.14 * (rad ** 2)) | |
def peri_of_circle(rad): | |
return (2 * 3.14 * rad) | |
def dia_of_circle(rad): | |
return (rad * 2) | |
def options(): | |
print(" ") | |
print("Hello, and welcome to the Basic Shapes program by le717.") | |
print(" ") | |
print("Please choose a shape:") | |
print(" 'P' Print all options") | |
print(" 'C' Circle") | |
print(" 'Q' Quit") | |
print(" ") | |
def select(): | |
print("Please make a selection: ") | |
choice = input("If you need to see the list of options again, please press 'P': ") | |
choice = "P" | |
#selection | |
while choice != "Q": | |
if choice == "C": | |
circle_info(Peri, Area) | |
## elif choice == "C": #Circle | |
## rad = float(input("Radius: ")) | |
## print("Diameter:", dia_of_circle(rad)) | |
## print("Perimeter:", peri_of_circle(rad)) | |
## print("Area:", area_of_circle(rad)) | |
## select() | |
else: | |
choice != "Q" #List of options | |
options() | |
choice = input("Please make a selection: ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment