Jun-06-2017, 02:46 AM
Hey all. Just started Fundamentals of Programming 1 at my local community college. I'm on my first homework assignment which is as follows:
Land Calculation.
One acre of land is equivalent to 43,560 square feet. Write a program that asks the user to enter the total square feet in a tract of land and calculates the number of acres in the tract. (Hint: Divide the amount entered by 43,560 to get the number of acres.
I'm getting a syntax error on my variable landSize. No matter what I change the name to it says there's a syntax error. Any help would be appreciated. Thank you.
# Brian Sullivan
# Program - Complete
# This program will calculate the number of acres in a tract of
# land after the user inputs the total square feet of their tract.
# Sets the variable equal to the amount of square feet in one acre.
oneAcre = 43560
# This gets the number of square feet in the user's tract of land.
squareFeet = int(input( "How many square feet is your tract of land? ")
# This calculates the land size in acres.
landSize = squareFeet / oneAcre
# Displays the result to the user.
print( "Number of acres: " + format(landSize, ".2f") )
Land Calculation.
One acre of land is equivalent to 43,560 square feet. Write a program that asks the user to enter the total square feet in a tract of land and calculates the number of acres in the tract. (Hint: Divide the amount entered by 43,560 to get the number of acres.
I'm getting a syntax error on my variable landSize. No matter what I change the name to it says there's a syntax error. Any help would be appreciated. Thank you.
# Brian Sullivan
# Program - Complete
# This program will calculate the number of acres in a tract of
# land after the user inputs the total square feet of their tract.
# Sets the variable equal to the amount of square feet in one acre.
oneAcre = 43560
# This gets the number of square feet in the user's tract of land.
squareFeet = int(input( "How many square feet is your tract of land? ")
# This calculates the land size in acres.
landSize = squareFeet / oneAcre
# Displays the result to the user.
print( "Number of acres: " + format(landSize, ".2f") )