Python Forum
syntax error, and call functions.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
syntax error, and call functions.
#1
First thing is first this program is meant to convert feet into inches. my first problem was that past the intro, I forgot to call the rest of the functions, so I just want to check and see if how I have it set up to call the rest of the functions will work. 
def main():
    #variables
    feet = 0
    inches = 12
    feetInches = 0
    intro()

#intro
def intro():
    print ("This program will help you convert how ever many feet you have into inches")
    getfeet()

#main calculation
def getFeet(feet):
    feet = input("How many feet do you have?")
    print (feet)
    inchesCalculation()

def inchesCalculation(feet, inches, feetInches):
    feetInches = feet * inches
    display()

def display(feet,feetInches):
    print ("There are " feetInches "inches in " feet "feet")  #here at feetInches I am getting a syntax error and I don't understand why.

main()
Reply


Messages In This Thread
syntax error, and call functions. - by Ayiden - Mar-23-2017, 02:54 PM
RE: syntax error, and call functions. - by Ayiden - Mar-23-2017, 03:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Shocked School project -- need help with it it says syntax error XPGKNIGHT 6 3,438 Aug-11-2022, 08:43 PM
Last Post: deanhystad
  I'm getting a syntax error very early on in my code and I can't quite figure it out. liloliveoil 1 2,055 Oct-30-2020, 05:03 AM
Last Post: deanhystad
  Unspecified syntax error hhydration 1 2,071 Oct-25-2020, 10:45 AM
Last Post: ibreeden
  Annuity function for school - syntax error peterp 2 2,047 Oct-12-2020, 10:34 PM
Last Post: jefsummers
  How to call self into other functions Drax_TheViper 1 1,675 Jun-30-2020, 01:10 PM
Last Post: pyzyx3qwerty
  Invalid syntax error, where? tucktuck9 2 3,476 May-03-2020, 09:40 AM
Last Post: pyzyx3qwerty
  Raise an exception for syntax error sbabu 8 3,337 Feb-10-2020, 01:57 AM
Last Post: sbabu
  syntax error: can't assign to operator liam 3 4,123 Jan-25-2020, 03:40 PM
Last Post: jefsummers
  Self taught , (creating a quiz) syntax error on my array DarkAlchemyXEX 9 4,475 Jan-10-2020, 02:30 AM
Last Post: ichabod801
  If Statements and Comparisons returns a syntax error DarkAlchemyXEX 2 2,507 Jan-02-2020, 01:25 PM
Last Post: DarkAlchemyXEX

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020