DEV Community

Cover image for Can you answer this ?
D\sTro
D\sTro

Posted on

2 2

Can you answer this ?

Solve this if you think Mathematics is directly related to Programming πŸ˜€

Top comments (10)

Collapse
 
mccurcio profile image
Matt Curcio β€’ β€’ Edited

PEMDAS is the Order of operations taught in my grade school.
Parentheses, Exponents, Multiplication, Division, Addition, Subtraction.

PEMDAS or BODMAS?

Collapse
 
slimdestro profile image
D\sTro β€’

Great! Thanks for explaining this

Collapse
 
shrihankp profile image
Shrihan β€’

6 Γ· 2(1 + 2)
= 6 Γ· 2(3)
= 6 Γ· 6
= 1

Collapse
 
slimdestro profile image
D\sTro β€’

Exact answer but only confusion is the application of PEMDAS vs BODMAS

Collapse
 
shrihankp profile image
Shrihan β€’

There are many others: BIDMAS, PEDMAS, etc. This article gives a detailed comparison between the two, and that, all the methods are not rules, it's just like a convention: slate.com/technology/2013/03/faceb...

Collapse
 
myleftshoe profile image
myleftshoe β€’ β€’ Edited

You can argue for both 9 or 1 equally but I think 1 looks more natural here
6 Γ· 2(1 + 2) = 1
Although 9 looks more natural (or not πŸ˜•) when expressed like this:
6 Γ· 2 x (1 + 2) = 9
And if (1+2) was replaced with a variable y having value 3, 1 looks more natural again
6 Γ· 2y = 1

Collapse
 
debaditya15 profile image
Debaditya Malakar β€’

6/2(1+2)
=6/2*3
=3*3
=9
Done Using BODMAS(Bracket Of Divsion Multiplication Addition Subtraction) Rule.

Collapse
 
slimdestro profile image
D\sTro β€’

Ofcourse itll be but have you tried solving this using PEMDAS?

Collapse
 
debaditya15 profile image
Debaditya Malakar β€’

Actually I don't know PEDMAS

Collapse
 
ritamwaikinda profile image
Rita Mwaikinda β€’

1

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay