'caluculating error or parents error in python?
a = 1200
b = 2200
c = 28276
t = 7
de = 7
dx = 12
func = (a*t)de+(b*t)dx-c
print(func)
but after compiling this, some error occurred.
File "", line 9 func = (at)de+(bt)dx-c ^ SyntaxError: invalid syntax
I really dont understand about parents.
Solution 1:[1]
I think this is what you're looking for: func = (a*t)*de+(b*t)*dx-c. The simplest way to perform multiplication in Python is by using the asterisk (*). You may also refer to arithmetic operators found in this documentation
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
