+ 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?

26th Mar 2019, 3:42 PM
Meiki
Meiki - avatar
13 Antworten
+ 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!
26th Mar 2019, 9:42 PM
::sк::
::sк:: - avatar
+ 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...
26th Mar 2019, 9:36 PM
::sк::
::sк:: - avatar
+ 2
In the formula you posted and then deleted E is not used...
26th Mar 2019, 9:54 PM
::sк::
::sк:: - avatar
+ 2
In general you would have to loop through all possible values of the variables and calculate the output from there...
26th Mar 2019, 9:58 PM
::sк::
::sк:: - avatar
+ 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...
26th Mar 2019, 10:24 PM
::sк::
::sк:: - avatar
+ 1
Thank you very much!
29th Mar 2019, 11:13 AM
Meiki
Meiki - avatar
+ 1
For how long do you have to study the Python course here to be able to code this?
30th Mar 2019, 12:49 PM
Meiki
Meiki - avatar
+ 1
It's the first few lessons, this is pretty basic stuff. But the course will get you there!
30th Mar 2019, 1:01 PM
::sк::
::sк:: - avatar
0
I don't know anything in python, that's why I ask you if you can program it.
26th Mar 2019, 9:40 PM
Meiki
Meiki - avatar
0
I know that SoloLearn is an app to learn to code, but I don't want to learn python just for this task.
26th Mar 2019, 9:45 PM
Meiki
Meiki - avatar
0
I know, overall there are 2 formulas, in the other one E is used
26th Mar 2019, 9:56 PM
Meiki
Meiki - avatar
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
26th Mar 2019, 9:57 PM
Meiki
Meiki - avatar
0
Ok
30th Mar 2019, 1:01 PM
Meiki
Meiki - avatar