When I try to run my code it says that "unexpected EOC while parsing". What does that mean? What should I do? My code will be listed below: def theList (base,pois) : """ Purpose: This is where I print out the list of values that are moltiples of base but not mulipltes of poison. """ if base % poison == 0: print ("*** and infinit number of X's ***") else : count = 0 toPrint = base while count < 10: print (toPrint, end= " ") toPrint += base count += 1 def theinput(): """ Purpose: Prompt for the base and the poison. It should return both values. """ try: theBase= input("Enter the base: ") theBase = int(theBase) thePois = input("Enter the Poison: ") thePois = int (thePois) return theBase, thePois def main(): try: b,p = theinput() except: print ("Invalid input") else: theList(b,p)
When I try to run my code it says that "unexpected EOC while parsing". What does that mean? What should I do?
My code will be listed below:
def theList (base,pois) :
"""
Purpose: This is where I print out the list of values that are moltiples of
base but not mulipltes of poison.
"""
if base % poison == 0:
print ("*** and infinit number of X's ***")
else :
count = 0
toPrint = base
while count < 10:
print (toPrint, end= " ")
toPrint += base
count += 1
def theinput():
"""
Purpose: Prompt for the base and the poison. It should return both values.
"""
try:
theBase= input("Enter the base: ")
theBase = int(theBase)
thePois = input("Enter the Poison: ")
thePois = int (thePois)
return theBase, thePois
def main():
try:
b,p = theinput()
except:
print ("Invalid input")
else:
theList(b,p)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images