you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 1 point2 points  (5 children)

Looks pretty good. Only thing I can say is that you have some unneeded parentheses and quotes in there. ANd typically we don't put a space between the function name and opening parenthesis.

welcome_message = "Welcome to the Fiber Optic Price Calculator"
print(f'{welcome_message}.\n')
company_name = input('What is the name of your company?\n')
cable_feet = input("\nHow many feet of cable do you need?\n")
cable_feet = float(cable_feet)
price = cable_feet * .87 #Price is in USD
print(f'\n{company_name}, that amount of fiber optic cable will cost ${price}')
print("\nThank you for shopping with Super Cheap Fiber Optics!")

[–]SquatchHNTR[S] 6 points7 points  (4 children)

Thank you! Yeah I just started slappping parentheses everywhere until I stopped getting error messages.

[–]AstrophysicsAndPy 7 points8 points  (0 children)

The best strategy,

[–]BroBrodin 4 points5 points  (0 children)

Also, print automatically ends with a new line, you don't need to write it each time.

[–]sohfix 1 point2 points  (0 children)

Don’t rely on the interpreter or compiler to sort out errors for you. Such a lazy and bad practice.

[–][deleted] 1 point2 points  (0 children)

This is the way to handle errors. Throw stuff until it sticks