+ 3
Can you help me please..😣😥create this code
Given 6/m = n/2+3/k, calculate the value of m when k = 6 and n = 8. This is my code..is it correct😟😧 https://code.sololearn.com/cEGKOhRPRu20/?ref=app
16 Answers
+ 8
Hi! to find out m you need to move 6 to the right by the rules of mathematics
+ 5
Solve the equation 6/m = n/2 + 3/k for m, so that m stands individually on one side of the "=".
Then put the solved equation into code.
+ 5
Mathematics is a difficult language 🙂
m = 6 / (n / 2 + 3 / k)
Happy coding.
+ 4
I don't think it's helpful to just give a ready-to-run code as an answer.
Maybe you would like to add a little explanation or suggest what could be further simplified in the code?
+ 3
JUMP_LINK__&&__Python__&&__JUMP_LINK Learner thank you very much..🤗😉👍
+ 2
NURUL AIN SYAFIQAH BINTI MUHAMMAD NAZIR unfortunatelly the equation from Python Learner is not correct resolved from: 6/m = n/2 + 3/k.
+ 2
Hello!
This is the correct code without any useless things.
print('hitung nilai m')
k = 6
n = 8
m = 6 / (n/2 + 3/k)
print("m =", m)
+ 1
Noumecha no it's: 6 / (...) not: (...) / 6
makes a huge difference
0
How to create it..😕😥
0
Hi again!
You just have to follow what they suggested to you.
Here it is your corrected code
print('calculate the value of m')
k=int(6)
n=int(8)
m =6/(n/2+3/k)
jawapani = m
print("m =",jawapani)
0
JaScript 👌😉
0
Ouhh...thank you for the explanation 😄
0
Aha, an application of lambda!
m = lambda k, n: 6 / (n / 2 + 3 / k)
Edit: Self-upvoted my comment due to an undeserved downvote
0
Hello so that's how you can find m:
m = ((n/2) + (3/k)) / 6. In mathematics when you put brakets in operation, the operation remain must important and will be treat first.
0
6 / m = n / 2 + 3 / k
How to only have 'm' on the left side in 3 steps:
1. Multiply both sides with 'm' to move it to the right:
6 / m * m = (n / 2 + 3 / k) * m
6 = (n / 2 + 3 / k) * m
As you can see, on the left side the multiplication of 'm' undid the division of 'm'.
2. Divide both sides by all the stuff in the parentheses to move that to the left:
6 = m * (n / 2 + 3 / k)
6 / (...) = m * (...) / (...)
6 / (n / 2 + 3 / k) = m
Again, you can see, that the division and multiplication of the same stuff undid themselves, this time on the right side.
3. Just reverse the two sides as it doesn't matter:
m = 6 / (n / 2 + 3 / k)
Et violà.
0
Piulin ah is true you right i miss something thanks