0

Why is this print (3(5-2)) wrong ?

Does python not consider a single parenthesis as a multiplication? Help

22nd Nov 2020, 12:37 PM
Elisia Gottlieb
Elisia Gottlieb - avatar
5 Respostas
+ 13
No only python but all languages doesn't consider parenthesis as multiplication. Because there is multiplication sign (*) for this. Method of parenthesis multiplication is only used in mathematics not in programming. This can be written as print(3*(5-2)) This will work. Happy coding 😊
22nd Nov 2020, 12:41 PM
ツSampriya😘ツ
ツSampriya😘ツ - avatar
+ 3
Thank you
22nd Nov 2020, 12:42 PM
Elisia Gottlieb
Elisia Gottlieb - avatar
+ 1
Appreciated
22nd Nov 2020, 1:03 PM
Elisia Gottlieb
Elisia Gottlieb - avatar
0
Thank u
24th Nov 2020, 4:23 AM
V Nikhil
V Nikhil - avatar
0
Nice
18th Dec 2020, 5:53 AM
Explorer
Explorer - avatar