0

what is parentheses and how to use it?

17th Jul 2016, 4:00 AM
RAVI ABHISHEK
RAVI ABHISHEK - avatar
3 Antworten
+ 2
( ) these braces are known as parentheses
17th Jul 2016, 6:50 AM
SIDDHARTH VASU
SIDDHARTH VASU - avatar
+ 1
We use parentheses in a programming language to control the order of operations. For example, in the following equation, the numbers 30 and 20 are multiplied first, and number 5 is added to their product: 5 + 30 * 20 However, is possible to change the order of operations by adding parentheses around the first two numbers, like so: (5 + 30) * 20 The result is different out course because the parenthesis tell Python to do the operation on the parentheses first, and then do the operation outside the parentheses. Also, parentheses can be nested, which means that they're can be parentheses inside parentheses, like this: ((5 + 30) * 20) / 10
17th Jul 2016, 6:32 AM
Francisco Gómez García
Francisco Gómez García - avatar
0
thank you
17th Jul 2016, 7:39 AM
RAVI ABHISHEK
RAVI ABHISHEK - avatar