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 24, 2020 in Python by anonymous
• 120 points
3,143 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 23, 2018 in Python by charlie_brown
• 7,720 points
909 views
0 votes
1 answer

What does calling a function means in Python?

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

answered Dec 18, 2018 in Python by Shuvodip
1,051 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
1,085 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,434 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
4,071 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
1,065 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
7,372 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP