0

okay so I was making a game in python to test what I learned but I have been doing the same thing but then I suddenly get an error of "unindent does not match any outer indentation level" and I can't understand why because it's almost the exact same as the others.

But the thing is i wrote it all under a break statement (at the bottom).

It's wrote all in python (The rest of the code is at the bottom) Here's the code.

print("88..__  |     |`-!._ | `.| |_______________||.'|  _!/000\0 |   _/0\00/")

unindent does not match any outer indentation level.

not all of it i cut a lot of it.

rest of code.

import random 
import time 
import sys
import os
import sys
import math

yes_no = ["yes", "no"]

response = ""
while response not in yes_no:
    response = input(":")
    if response == "security cameras":
    print("the 00/00 are cracks in the camera\n")
time.sleep(3)
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
time.sleep(2)
print(" ")
print("cam 2")
print("--------------------------|")
print("   _________ ,%%&%,       |")
print("   /\     _   \%&&%%&%    | ")
print("/  \___/^\___\%&%%&&      |")
print("  |  | []   [] |%\Y&%'    |")
print("|  |   .-.   |   ||       |")  
print("~~@._|@@_|||_@@|~||       |")
print("--------------------------|")
print(" ")
time.sleep(5)
print(" ")
print("cam 4")
print("-----------------------------------------------|")
print("                      00/0                     |")
print("\00                   00\00     _||____              |")
print("0\00/\ /\            000/00  /\\\/\\000                  |")
print("/00\0/\\/\\        _00/000  /__\\\/0000                  |")
print("/0\00\\/\\       000/000    |__|_|_|__|             |")
print("|| 0\00 ||      o0/0000   |  |/|\| /|             |")
print("~~~~~00\0~~~~~~~0/0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-|")
print("      0\0_ _   00/00                             |")
print("      _0-0\0000/0_                                 |")
print("   _-' __00\_0/000-_                           |")
print("_-' ______0\/_0000__ '-_                       |")
print("|___|00000/0|____|                             |")
print("|___0000_/0|||___|                             |")
print("|__00/00\0|______|                               |")
print("|__000/0||0\00__|                                 |")
print("|000/0||||0_\0___|                               |")
print("|_0/0|||||0\0____|                               |")
print("-----------------------------------------------|")
time.sleep(5)
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print("cam 6")
print("______________________________________________")
print("|.'',                                     ,''.|")
print("|.'.'',                                 ,''.'.|")
print("|.'.'.'',                             ,''.'.'.|")
print("|.'.'.'.'',                         ,''.'.'.'.|")
print("|.'.'.'.'.|                         |.'.'.'.'.|")
print("|.'.'.'.'.|===;                 ;===|.'.'.'.'.|")
print("|.'.'.'.'.|:::|',             ,'|:::|.'.'.'.'.|")
print("|.'.'.'.'.|---|'.|, _______ ,|.'|---|.'.'.'.'.|")
print("|.'.'.'.'.|:::|'.|'|???????|'|.'|:::|.'.'.'.'.|")
print("|,',',',',|---|',|'|???????|'|,'|---|,',',',',|")
print("|.'.'.'.'.|:::|'.|'|???????|'|.'|:::|.'.'.'.'.|")
print("|.'.'.'.'.|---|','   /%%%\   |--|---|.'.'.'.'.| ")
print("|.'.'.'.'.|===:'    /%%%%%\    ':===|.'.'.'.'.|")
print("|.'.'.'.'.|%%%%%%%%%%%%%%%%%%%%%%%%%|.'.'.'.'.|")
print("|.'.'.'.','       /%%%%%%%%%\       ','.'.'.'.|")
print("|.'.'.','        /%%%%%%%%%%%\        ','.'.'.|")
print("|.'.','         /%%%%%%%%%%%%%\         ','.'.|")
print("|.','          /%%%%%%%%%%%%%%%\          ','.|")
print("|;____________/%%%%%%%%%%%%%%%%%\____________;|")
time.sleep(5)
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print("88888888888888888888888888888888888888888888888888888888888888888888888")
print("88.._|      | `-.  | `.  -_-_ _-_  _-  _- -_ -  .'|   |/|00     |  _..88")  
print("88   `-.._  |    |`!  |`.  -_ -__ -_ _- _-_-  .'  |.;'/00|00  _.!-'|  88")
print(" 88..__  |     |`-!._ | `.| |_______________||.'|  _!/000\0 |   _/0\00/ ")
print("88..__  |     |`-!._ | `.| |_______________||."'|  _!/000\0 |   _/0\00/")
print("88   |      |``--..|_ | `;!|l|MMoMMMMoMMM|1|.'j   | /..!-'|00/0|0000000/")
print("88   |      |    |   |`-,!_|_|MMMMP'YMMMM|_||.!-;'  \0000000/0000000/")
print("88___|______|____!.,.!,.!,!|d|MMMo * loMM|p|,!,.!.,.!\0000000|000000/")  
print("88      |     |    |  |  | |_|MMMMb,dMMMM|_|| |   |   \0000000/00000/")
print("88      |     |    |..!-;'i|r|MPYMoMMMMoM|r| |`-..|   |\00000/00000/")
print("88      |    _!.-j'  | _!,"|_|M)(MMMMoMMM|_||!._|  `i-!/000000-000/")
print("88     _!.-'|    | _."|  !;|1|MbdMMoMMMMM|l|`.| `-._|  \000/0000000/")
print("88..-i'     |  _.''|  !-| !|_|MMMoMMMMoMM|_|.|`-. | ``./00000000/")
print("88   |      |.|    |.|  !| |u|MoMMMMoMMMM|n||`. |`!    \00000000\")  
print("88   |  _.-'  |  .'  |.' |/|_|MMMMoMMMMoM|_|! |`!  `,.|/00000000\")
print("88  _!"'|     !.'|  .'| .'|[@]MMMMMMMMMMM[@] \|  `. | /0000000000\")
print("88-'    |   .'   |.|  |/| /                 \|`.  |`!/00000000000\")
print("88      |_.'|   .' | .' |/                   \  \ | /0000000000000\")
print("88     .'   | .'   |/|  /                     \ |`!/00000000000000/")
print("88  _.'     !'|   .' | /                       \|/000000000000000/")
print("88888888888888888888888888888888888888888888888/")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")
print(" ")

break
if response == "open internet explorer":
 i()
 know()
 that()
 me()
 i()
 know()
 that()
 me()
 i()
 know()
 web()
 that()
 me()
 i()
 know()
 that()
 me()
 i()
 know()
 that()
 me()
 i()
 know()
 that()
 me()
 did()
 this
 the()
 hard()
 way()
 but()
 it()
 really()
 sucks()
 Its()
 too()
 much()
 effort()
 pls()
 help()
 me()
 my()
 hand()
 hurt()
 break
elif response == "unneeded":
    print("unneeded\n")
else: 
    print("I didn't understand that.\n")
j08691
  • 204,283
  • 31
  • 260
  • 272
  • "then I suddenly get an error of "unindent does not match any outer indentation level" and I can't understand why because it's almost the exact same as the others." Do you understand what "unindent" means here? Do you understand what "match" means? Do you understand what "indentation level" means? Do you understand how indentation is used in Python, and why it is important? – Karl Knechtel Sep 22 '20 at 02:01
  • 1
    Anyway, don't show us "filler" code with a bunch of placeholders, and then tell us that you "cut a lot out". Show us a *small* example *that demonstrates the problem, by itself*, that other people *can use by itself, without modification, to see the problem*. – Karl Knechtel Sep 22 '20 at 02:01
  • But the indentation of the code you've shown us doesn't make any sense at all, and I also don't understand what you're hoping to accomplish with your use of `break`. – Karl Knechtel Sep 22 '20 at 02:03
  • Please don't deface questions. Even your own – j08691 Nov 02 '21 at 21:02

1 Answers1

2

One problem I noticed is, at this line

print("88..__  |     |`-!._ | `.| |_______________||."'|  _!/000\0 |   _/0\00/")`,

you have added one double quotes in the middle. if that is necessary you should escape it like this,

print("88..__  |     |`-!._ | `.| |_______________||.\"'|  _!/000\0 |   _/0\00/")`,

Also I could see some unusual indentation for 'if' statements,

if response == "open internet explorer":
 i()
 know()
 ....
 break
elif response == "unneeded":
    print("unneeded\n")

This should be,

if response == "open internet explorer":
   i()
   know()
   ....
   break
elif response == "unneeded":
   print("unneeded\n")
Maran Sowthri
  • 829
  • 6
  • 14
  • 2
    The double quote and some other characters are probably from an ASCII art generator. They must be escaped instead. – Martheen Sep 22 '20 at 01:58