This is program i made (basic mash);
I want to make it so that the program will ask if you want to repeat it again. "n" = exit. and anything else makes it repeat.....can someone help me? I'm not sure how to do it ...
x = 0
import random
house =["Mansion", "Apartment", "Shack", "House"]
spouse =["EMPTY", "EMPTY", "EMPTY", "EMPTY"]
car =["EMPTY", "EMPTY", "EMPTY", "EMPTY"]
def dieroll():
randomnumber = random.randrange(10)+1
return randomnumber
print "Enter the name of three people you could marry: "
name1 = raw_input("Name1: ")
spouse[0]= name1
name2 = raw_input("Name2: ")
spouse[1]= name2
name5 = raw_input("Name3: ")
spouse[2]= name5
print "Enter the name of one person you wouldn't want to marry:"
name4 =raw_input("Name4: ")
spouse[3]= name4
print "Enter the name of 3 cars you want: "
car1 =raw_input("car1: ")
car[0]= car1
car2 = raw_input("car2: ")
car[1] = car2
car3=raw_input("car3: ")
car[2]=car3
print "Enter the name of one car you don't want: "
car4 =raw_input("car4: ")
car[3]=car4
#Results
print
print
print "You will live in a", random.choice(house)
print "Married to", random.choice(spouse)
print "While driving your", random.choice(car)
print "With your", dieroll(), "kids in it!"
raw_input("\nPress the Enter key to continue")