# Interpreting formulas with ΣΣ (two sigma) in Python

#### Consider the function f(x,y) that equals to two sigma (ΣΣ) where i ranges from 1 to 10 and (first sigma) and j ranges from 1 to 10 (second sigma) of the quantity {ix^2 + jy^3) I believe the first sigma would be an inner loop and the second sigma an outer loop but I am having trouble rewriting this into Python. Can someone please help me convert this into python? Submitted October 11th 2021 by Admin

#### The first answer's approaches all work. Often the "pythonic" approach is to define a list comprehension before using `sum` so another approach would be: ``````def f(x, y): return sum([(i * x ** 2 + j * y ** 3) for i in range(1,11) for j in range(1, 11)]); ``````

Relevant Questions

#### How do i print a list of float values without the list brackets?

October 17th 2021

#### Create Flask endpoint using a Loop

October 16th 2021

#### If user inputs letter output should be word

October 16th 2021

#### How do I solve a traceback when runing manage.py commands?

October 15th 2021

#### Getting Error while using min() funtion in jupyter notebook

October 14th 2021