ItemNumber = []
ItemDescription = []
ItemReserveprice = []
ItemBids = []
Item = 0
Buyerno = 1
BuyerNumber = []
sellercount = 0
whoareyou = input("Are you a seller or a buyer? enter s/b ")
if whoareyou == "s":
choice1 = input("Do you want to enter your seller ID?: ")
if choice1 == "yes":
testItemNumber = input("Please enter your seller id in the form 00N: ")
for i in ItemNumber:
if i == testItemNumber:
print("Please enter another seller ID")
ItemNumber.insert(sellercount,int(input("Enter your seller ID again, please make sure it is in the form 00N: ")))
while Item < 11:
ItemDescription.insert(Item,input("Enter your item description: "))
ItemReserveprice.insert(Item,int(input("Enter your reserve price: ")))
ItemBids.insert(Item,0)
Item = Item + 1
if choice1 == "no":
ItemNumber.insert(sellercount,('00' + str(sellercount+1)))
print (ItemNumber[sellercount],"is your seller ID")
while Item < 10:
print ("Now enter Item number",Item+1)
ItemDescription.insert(Item,input("Enter your item description: "))
ItemReserveprice.insert(Item,int(input("Enter your reserve price: ")))
ItemBids.insert(Item,0)
Item = Item + 1
print ("Auction Starts!")
print ("You are now in the buyer screen")
BuyerNumber.insert(Buyerno,('aa' + str(Buyerno)))
print ("Your buyer number is",BuyerNumber)
or i in range (0,10):
print ("The Item number of item number ",i+1,"is",ItemNumber[i],"The Description is",ItemDescription[i],"The reserve price is",ItemReserveprice[i])
choice2 = input("What item do you want to bid for?, enter the item number")
if i try to print any element from the array that is not the first one i get that error. For example if i try to print ItemNumber[2] or anything above so i cant print ItemNumber[i] as when i goes 2 to i get that error. I'm trying a task for an auction specifically the 2019 June Computer science pre release paper.Im a beginner so please dont bash this is my 2nd month. PS: the code is not completed