Sigma code look like this but it s not working

0 votes
def sigma(lowerBound, upperBound):
    x = list(range(lowerBound, upperBound))
    print(str(pow(Id,i) /factorial(n)*pow(Mu,i)))

 My sigma code look like this but it’s not working
My value is tuple

Nov 15, 2020 in Python by Rajiv
• 8,910 points

1 answer to this question.

0 votes

Use Markdown to style code:

- Use a single backtick (`) at the beginning and end of your single code line:
  print("hello world")
- Use three backticks (```) at the beginning and end of multiple code lines:
  def hello(name):
      print(f"hello {name}")

Thinking about how sigma works

You need an initial sum.

You then want a way to add the expression with each succession. As Sato said, a for loop would be good for this - going from the range of lower to upper bound

With each iteration of the loop add the result of the expression to the current sum

answered Nov 15, 2020 by Gitika
• 65,910 points

Related Questions In Python

+2 votes
0 answers
0 votes
1 answer

i write this python to read dataset into panda data frame but im getting NameError: name 'true' is not defined. Below is the code:

change  def parse(path):   g = gz ...READ MORE

answered Mar 15, 2020 in Python by Abhishek Shingadiya
0 votes
0 answers

I am trying to click the button but it is not working and it is drop list ..

<a class="quickreports btn btn3d tbbtn" href="javascript:" style="position:static" ...READ MORE

Dec 2, 2019 in Python by anonymous
• 120 points
0 votes
0 answers

But when I run this, I get NameError: name 'alphabeta' is not defined error. How to solve this?

tree = [[[5, 1, 2], [8, -8, ...READ MORE

Sep 6, 2020 in Python by MUHAMMAD
• 160 points

retagged Sep 7, 2020 by Gitika 1,098 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,218 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
0 votes
1 answer
0 votes
1 answer

I've been trying to run this code, but the error says "Expected an indented block" for the line, " word_as_list[index] = guess."

Hi, @Paradox, The error message IndentationError: expected an indented ...READ MORE

answered Nov 21, 2020 in Python by anonymous
• 65,910 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP