+ 1

problem with asterisk

so Iā€˜ve been practicing simple operations on my mac and the input I want is (-7 + 2) * (-4) but when I type the input as : print(-7 + 2) * (-4) thereā€™s an Error I also tried to put brackets on the asterisk : print(-7 + 2)(*)(-4) Iā€˜m a beginner so Iā€™m sorry if the answer is obvious but it would really help me to understand more! ā™”

25th Aug 2018, 1:49 PM
vee
1 Answer
+ 6
... is there anything preventing you from doing print((-7 + 2) * (-4)) print() is a function, so whatever you want to print, goes inside the parentheses. print("inside here")
25th Aug 2018, 1:51 PM
Hatsy Rei
Hatsy Rei - avatar