I Need Help

homework

#1

For some reason this code says IndentationError: unindent does not match any outer indentation level

this is my code

import time
import random
print("Welcome to LittleGame!")
time.sleep(2)
start = input("Would you like to play? Y Or N")

if start == ("N") or start == ("n"):
	print("Awwww D:")
	time.sleep(1)
	print("Bye :(")
	time.sleep(3)
	exit()

if start == ("Y") or start == ("y"):
	print("Ok!")
	time.sleep(1)
go = ("1")

if go == ("1"):
	print("Let's Play Scissors, Paper, Rock. But Don't type anything.")
	time.sleep(1)
	print("I'll Give You 5 seconds to make a decision.")
	time.sleep(1)
	print("5")
	time.sleep(1)
	print("4")
	time.sleep(1)
	print("3")
	time.sleep(1)
	print("2")
	time.sleep(1)
	print("Times Up!")
	time.sleep(1)
	number = random.choice("123")

if number == ("1"):
  print('I Chose Paper! Did You Win?')
  time.sleep(3)
  exit()

if number == ("2"):
	print('I Chose Rock! Did You Win?')
  time.sleep(3)
  exit()

if number == ("3"):
	print('I Chose Scissors! Did You Win?')
  time.sleep(3)
	exit()

#2

looking at your code:

i do indeed see indent issues


#3

Thank’s this is my school project and i need to geti t right :stuck_out_tongue:


#4

do you think you can fix the indent yourself?


#5

Well now this wont work after the var number2 is generated it just stops

import time
import random
number = ("xd")
print("Welcome to LittleGame!")
time.sleep(2)
start = input("Would you like to play? Y Or N")

if start == ("N") or start == ("n"):
	print("Awwww D:")
	time.sleep(1)
	print("Bye :(")
	time.sleep(3)
	exit()




if start == ("Y") or start == ("y"):
	print("Ok!")
	time.sleep(1)
go = ("1")

if go == ("1"):
	go2 = input("Would You Like to play A Scissors, Paper, Rock? or B Bunny, Gun, Carrot")

if go2 == ("A") or go2 == ("a"):
  print("Let's Play Scissors, Paper, Rock. But Don't type anything.")
  time.sleep(1)
  print("I'll Give You 5 seconds to make a decision.")
  time.sleep(5)
  print("Times Up!")
  time.sleep(1)
  number = random.choice("123")

if go2 == ("B") or go2 == ("b"):
  print("Let's Play Bunny, Carrot, Gun. But Don't type anything.")
  time.sleep(1)
  print("I'll Give You 5 seconds to make a decision.")
  time.sleep(5)
  print("Times Up!")
  time.sleep(1)
  number2 = random.choice("123")

if number == ("1"):
  print('I Chose Paper! Did You Win?')
  time.sleep(3)
  exit()

if number == ("2"):
  print('I Chose Rock! Did You Win?')
  time.sleep(3)
  exit()

if number == ("3"):
  print('I Chose Scissors! Did You Win?')
  time.sleep(3)
  exit()



if number == ("1"):
  print('I Chose Bunny! Did You Win?')
  time.sleep(3)
  exit()

if number == ("2"):
  print('I Chose Gun! Did You Win?')
  time.sleep(3)
  exit()

if number == ("3"):
  print('I Chose Carrot! Did You Win?')
  time.sleep(3)
  exit()

#6

Just found the issue

if number == ("1"):
	print('I Chose Paper! Did You Win?')
	time.sleep(3)
	exit()

if number == ("2"):
	print('I Chose Rock! Did You Win?')
	time.sleep(3)
	exit()

if number == ("3"):
	print('I Chose Scissors! Did You Win?')
	time.sleep(3)
	exit()

if number == ("1"):
	print('I Chose Bunny! Did You Win?')
	time.sleep(3)
	exit()

if number == ("2"):
	print('I Chose Gun! Did You Win?')
	time.sleep(3)
	exit()

if number == ("3"):
	print('I Chose Carrot! Did You Win?')
	time.sleep(3)
	exit()

lol


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.