please explain me what does i-1 in python user define function

0 votes
def is_correct(table,number):
    for i in range(1,11):
        if table[i-1]!=i * number:
            return i-1
Jun 23, 2020 in Python by anonymous
• 120 points
81 views

1 answer to this question.

+1 vote
i - 1 is the index of the table  which the user is providing we are subtracting 1 from it because in python the indexes start from 0.
answered Jun 28, 2020 by Shaurya Thapliyal
• 340 points

Related Questions In Python

0 votes
1 answer

What does ' -> ' mean in Python function definitions?

It's a function annotation. In more detail, Python 2.x ...READ MORE

answered May 22, 2018 in Python by charlie_brown
• 7,780 points
207 views
0 votes
1 answer

What does calling a function means in Python?

Calling a function means that you are ...READ MORE

answered Dec 17, 2018 in Python by Shuvodip
221 views
0 votes
1 answer

What does the random.triangular(low, high, mode) function do in python?

It returns a random floating point number ...READ MORE

answered May 27, 2019 in Python by Vinod
507 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 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,842 views
0 votes
0 answers
+4 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,810 points
1,419 views
0 votes
1 answer

Error in the Javis Project

what you can do is download the ...READ MORE

answered Jun 28, 2020 in Python by Shaurya Thapliyal
• 340 points
144 views
0 votes
2 answers

Recursive Pattern Using Python

n = int(input("please enter your no:")) k = ...READ MORE

answered Jun 28, 2020 in Python by Shaurya Thapliyal
• 340 points
1,052 views