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
2,587 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
653 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
813 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
936 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,080 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
3,502 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
872 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
6,914 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