Home > other >  Python code, bosses to help find something wrong
Python code, bosses to help find something wrong

Time:09-30

While True:
Print (' select the serial number need to compute graphics')
T=input (' 1. Cube 2. 3. Cuboid parallelogram 4. 5. Triangle rectangle 6. Square 7. Trapezoidal 8. Round ')
# parallelogram
If t=='3' :
Print (' the bottom of the parallelogram area=x high present 2 ')
Print (' parallelogram perimeter=+ side (bottom) x 2 ')
A=input (' please enter the bottom long:)
B=input (' please enter the long side: ')
H=input (" please enter high; ')
Print (" area "+ STR (int * int (a) (h)/2))
Print (' perimeter + STR ((int) (a) + int * 2) (b))
# triangle
If t=='4' :
Print (' x==bottom triangle area high present 2 ')
A=input (' please enter the bottom length:)
H=input (' please enter high:)
Print (" area "+ STR (int * int (a) (h)/2))
# rectangular
If t=='5' :
Print (' rectangle area=length * width)
A=input (' please enter long:)
B=input (' please enter wide:)
Print (" area: "+ STR (int * int (a) (b)))
# illegal tips
If t!=(' 1 ' '2' '3', '4' '5' 6 ', '7' '8') :
Print (' illegal input)
Error:
If t=='4' :
^
SyntaxError: invalid syntax

CodePudding user response:

If t=='4' : this line of code in front of a line of code
Print (' perimeter + STR ((int) (a) + int * 2) (b))
Should be behind without the parentheses,
Print (' perimeter + STR ((int) (a) + int * 2) (b)))

CodePudding user response:

reference 1/f, ice wind of reply:
if t=='4' : this line of code in front of a line of code
Print (' perimeter + STR ((int) (a) + int * 2) (b))
Should be behind without the parentheses,
Print (' perimeter + STR ((int) (a) + int * 2) (b)))

The program can run, thank you

CodePudding user response:

reference 1/f, ice wind of reply:
if t=='4' : this line of code in front of a line of code
Print (' perimeter + STR ((int) (a) + int * 2) (b))
Should be behind without the parentheses,
Print (' perimeter + STR ((int) (a) + int * 2) (b)))

Is more than a left parenthesis oh

CodePudding user response:

refer to the second floor m0_46231380 response:
Quote: refer to 1st floor ice all over the sky the wind response:
if t=='4' : this line of code in the front of the one line of code
Print (' perimeter + STR ((int) (a) + int * 2) (b))
Should be behind without the parentheses,
Print (' perimeter + STR ((int) (a) + int * 2) (b)))

Program can be run, thank you

Bad, wrong, is less

CodePudding user response:

Your input string (serial number), calculation of time to use Numbers
  • Related