Hello, I am a new CSC 111 student. I have this problem where I am supposed to create "interactive forms", but I'm having trouble figuring out how to do the height, the "time" portion of the form, and it doesn't seem to cooperate interactively. I have the problem and my code posted below. May I please have help with this? I would really appreciate it. Thank you! I've attached the problem and my code is below:
Here is my code:
def main():
#get data from user
totalWidth=eval(input("What is the width of the box?"))
label=input("What is the label of the box under the date?")
noCandidates=eval(input("How many candidates do you have?"))
names=[]
for i in range(noCandidates)
names.append(input("Candidate 1:", "Candidate 2:", "Candidate 3:")
#compute the different quantities
bar ="+" + '-'*(totalWidth-2) + "+"
blank ='|' + ' '*(totalWidth-2)+ "+"
dateLine ='| Date: |'
dateLine2 ="+-------------------+"
lineUnderDate ='| |'
lineUnderDate2="+-------------------+"
noSpacesB4=totalWidth-len(dateLine)-1
dateLine2='|'+' '*noSpacesB4 + dateLine2
#space things out
print("\n\n\n\n\n")
#output the forms for each name
for name in names:
print(bar)
totalNoSpace=totalWidth-2-len(name)
noSpaceB4Date=totaNoSpaces+1 -len(dateLine)
print('|'+name+' '*noSpacesB4Date+dateLine)
print(dateLine2)
print(lineUnderDate2)
print(blank)
print(bar)
#print blank box
for i in range(heightBox)
print(blank)
print(bar)
print()
main()