Question: I keep getting error, unexpected space with 32, 80, 20. Not sure how to adjust this. Everything looks align to me. EXPECTED INPUT IS :

I keep getting error, unexpected space with 32, 80, 20. Not sure how to adjust this. Everything looks align to me.

EXPECTED INPUT IS : 32 45 48 80

import random

def number_guess(i):

num = random.randint(1, 100) # generate random number between 1 and 100

if i < num:

print(i,"is too low. Random number was " + str(num) + ".")

elif i > num:

print(i,"is too high. Random number was " + str(num) + ".")

else:

print(num,"is correct!")

a = list(map(int,input(" ").strip().split())) # read the list of numbers

random.seed(900) # seed the value with 900

for i in a: # iterate each number in the list number_guess(i)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!