My issue
def find_incorrect_questions(X):
if X % 3 == 0:
return 0
elif (X + 1) % 3 == 0:
return 1
elif (X + 2) % 3 == 0:
return 2
Example usage
X = int(input("Enter the value of X: "))
print(find_incorrect_questions(X))
Even after doing this i am getting wrong
My code
def find_incorrect_questions(X):
if X % 3 == 0:
return 0
elif (X + 1) % 3 == 0:
return 1
elif (X + 2) % 3 == 0:
return 2
# Example usage
X = int(input("Enter the value of X: "))
print(find_incorrect_questions(X))
Learning course: Design and Analysis of Algorithms
Problem Link: Problem 3 (High Accuracy) - Solve sub-components in Design and Analysis of Algorithms