+ 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 Odpowiedź
+ 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