Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

Students also viewed these Databases questions

Question

List and describe the seven information-gathering techniques.

Answered: 1 week ago

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago

Question

Discuss about training and development in India?

Answered: 1 week ago

Question

Explain the various techniques of training and development.

Answered: 1 week ago

Question

Explain the various techniques of Management Development.

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago