IndentationError unindent does not match any outer indentation level

0 votes

When I compile  my python code I am getting this error

My code:

import sys

def Factorial(n): # Return factorial
    result = 1
    for i in range (1,n):
        result = result * i
    print "factorial is ",result
    return result

This is the error I am getting:

IndentationError: unindent does not match any outer indentation level

Can someone please explain to me why this error occurred? and how can I solve this?

May 2, 2022 in Python by Kichu
• 19,040 points
641 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Python

0 votes
1 answer
0 votes
1 answer

What to do when len() does not return the number of integers in range(1,100)?

You can use the following code block: x=range(1,100) len(x) Output: ...READ MORE

answered May 28, 2019 in Python by Fata
• 1,050 points
858 views
0 votes
1 answer

Open a file if it exists or create and open it does not exists - Python

You can use this: f = open("ex.txt","w+") Here the ...READ MORE

answered Jun 20, 2019 in Python by Jason
7,231 views
0 votes
1 answer

TypeError: 'AxesSubplot' object does not support indexing

Hello , If you plot multiple subplots, the plt.subplots() returns ...READ MORE

answered May 7, 2020 in Python by Niroj
• 82,840 points
21,406 views
0 votes
0 answers

What does NameError: name 'withdrawal' is not defined mean ?

READ MORE

Jun 6, 2020 in Python by Shanice
• 120 points

recategorized Jun 8, 2020 by Gitika 903 views
+1 vote
1 answer

Error:Getting Site Matching Query Does Not Exist Error after creating django admin

Hello @kartik, The Site object for your Django project is ...READ MORE

answered Jun 22, 2020 in Python by Niroj
• 82,840 points
12,592 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,466 views
0 votes
1 answer
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