2 Topics
|
|
Notice that if you negate a boolean value with `not` in comparison with other boolean value or similar, you should put it inside a pair of parenthesis, otherwise you get syntax error: >>> 0 == not 1 SyntaxError: invalid syntax >>> 0 == (not 1) True >>> |
|
Writing a program that reads a string of arithmetic expression from the keyboard and evaluates the arithmetic operation in the string. Some example runs are given below. program should accept only * any real or integer numbers * four basic arithmetic operators, +, -, *, / * paranthesis ( , … |
The End.