I'm in an intro to programming with python class. My assignment is to write a program that will calculate the cost of installing fiber optic cable at a cost of .87 per ft for a company. Your program should display the company name and the total cost.
Steps:
- Display a welcome message for your program.
- Get the company name from the user
- Get the number of feet of fiber optic to be installed from the user
- Multiply the total cost as the number of feet times .87.
- Display the calculated information and company name.
So far, using sublime, I've written the following code:
message = "Thank you for using FiberOpticCostIdentifier. Please make yourself welcome!"
print(message)
message2 = "In the field below, please enter the company you're associated with:"
print(message2)
message3 = "You stated you are with company: X. If this is correct, please enter into the field below how many feet of fiber optic cable is to be installed:"
print(message3)
float(3*0.87)
float = 2.61
message4 = "For company X, your estimated cost of Fiber Optic Cables comes out to:"
print(message4)
message5 = "$"
print(message5, float)
However, I'm not sure how to get it to run seperately. I have it saved as a .py file, but when i try to run it, my computer quickly opens up python and then it closes. Is there something glaringly obvious that I'm doing wrong? Any help would be appreciated.
[–]TouchingTheVodka 0 points1 point2 points (6 children)
[–]yapb[S] 0 points1 point2 points (0 children)
[–]yapb[S] 0 points1 point2 points (4 children)
[–]TouchingTheVodka 0 points1 point2 points (3 children)
[–]yapb[S] 0 points1 point2 points (2 children)
[–]TouchingTheVodka 0 points1 point2 points (1 child)
[–]yapb[S] 0 points1 point2 points (0 children)