Coding task | Sololearn: Learn to code for FREE!

+1

Coding task

I have a formula, and in this formula appear 6 variables. Some of this variables have constant values, but some other could have multiple different values, so that the formula has many possible results. I want to have a code where I can write the different variables and the formula in it and all the different results appear. Is that possible? The language doesn't matter. Should I give more information?

3/26/2019 3:42:30 PM

Meiki

13 Answers

New Answer

+3

From what I understand, SoloLearn is a tool for learning how to code, not for soliciting free code from others? The python course is just a few taps away!

+2

Assuming by formula you mean math formula, that is what computers are generally good at... Try tackling it in python as you can avoid typing issues mostly...

+2

In the formula you posted and then deleted E is not used...

+2

In general you would have to loop through all possible values of the variables and calculate the output from there...

+2

Like so: https://code.sololearn.com/cd9IJvZ0qRlh/?ref=app This is the really beginner's version for your first formula. Try it yourself with the other one by just copying and replacing the iteration variables...

+1

Thank you very much!

+1

For how long do you have to study the Python course here to be able to code this?

+1

It's the first few lessons, this is pretty basic stuff. But the course will get you there!

0

I don't know anything in python, that's why I ask you if you can program it.

0

I know that SoloLearn is an app to learn to code, but I don't want to learn python just for this task.

0

I know, overall there are 2 formulas, in the other one E is used

0

The formulas are: A*F*C-D*B-A*C*4-2*D+4 and A*B+E*D*5+F*C+A*E-B*3 And the variables are: A = 25 B = 63 C = 48 D = 104 E = 56 or 70 or 53 or 74 F = 40 or 45

0

Ok