+ 1

(x3/y5)+(x7+y10)+(x11/y15)+....+(x4*n-1/y5n)

Help.... Need programming code for this logic

11th Nov 2022, 3:23 PM
Jeya Prakash J
Jeya Prakash J - avatar
13 Answers
+ 5
sum=0 n=15 x=4 #sample y=5 for n in range(1,n+1): sum += x*(4*n -1) / (y * 5 *n) print(sum) #do you need to generate the question text? why x, y have string values?
11th Nov 2022, 5:07 PM
Jayakrishna 🇮🇳
+ 3
Most programming languages understand variables and math operators the same way as you would write a math formula. It is very likely that the computer can calculate the result for you, if you have a value for each variable. But multivariate equations with 15 unknowns, is a totally different question.
11th Nov 2022, 3:33 PM
Tibor Santa
Tibor Santa - avatar
+ 3
#python x3=7 y5=32 # ... assign all variables like above print((x3/y5)+(x7+y10)+(x11/y15)+....+(x4*n-1/y5n)) # But this part +...+ must also be exact
11th Nov 2022, 3:53 PM
Tibor Santa
Tibor Santa - avatar
+ 2
As @Tiber told already , For me it looks like just use a loop from i = 1 to n iterating : Find x *(n-1) + y *(5*n) value and add sum. For final result, you need x, y values.. Hoping it's not multivariate..
11th Nov 2022, 3:58 PM
Jayakrishna 🇮🇳
+ 2
Sorry but it is getting very confusing what you are trying to calculate. Your code is very different from your question. x="x" y="y" This is not going to work unless you assign specific numbers to x and y. To solve equations for x and y unknown, you can try sympy but you need to describe the task more clearly
11th Nov 2022, 5:06 PM
Tibor Santa
Tibor Santa - avatar
+ 1
What language do you want? HTML CSS js jquery node.js python c what do you want?
13th Nov 2022, 12:36 PM
Abdulrazaq Ossayan
Abdulrazaq Ossayan - avatar
11th Nov 2022, 3:49 PM
Jeya Prakash J
Jeya Prakash J - avatar
0
https://code.sololearn.com/cllJcdcFZ6rm/?ref=app I give x and y values , still not working
11th Nov 2022, 4:29 PM
Jeya Prakash J
Jeya Prakash J - avatar
0
Jayakrishna🇮🇳 Tibor Santa thanks,its work. I just tried using it for unknown variables
11th Nov 2022, 5:09 PM
Jeya Prakash J
Jeya Prakash J - avatar
0
Yiri gg
12th Nov 2022, 10:33 PM
Maneesh Gupta
Maneesh Gupta - avatar
0
Ayuda Crear un array de 10 posiciones de números enteros, con valores pedidos por teclado. Mostrar por consola el índice y el valor al que corresponde. Hacer dos métodos, uno para rellenar valores y otro para mostrar.
12th Nov 2022, 11:04 PM
Kevin Mendoza
Kevin Mendoza - avatar
0
هل يوجد بينكم من يتحدث العربيه
13th Nov 2022, 9:10 AM
Abdullah Ahmed
Abdullah Ahmed - avatar
13th Nov 2022, 12:55 PM
Jeya Prakash J
Jeya Prakash J - avatar