Question: slove with python 3 def get_uid(network): '''(2Dlist)->int Keeps on asking for a user ID that exists in the network until it succeeds. Then it returns

slove with python 3

def get_uid(network): '''(2Dlist)->int Keeps on asking for a user ID that exists in the network until it succeeds. Then it returns it''' # YOUR CODE GOES HERE pass

run:

>>> get_uid(net1) Enter an integer for a user ID:alsj

That was not an integer. Please try again.

Enter an integer for a user ID: twenty

That was not an integer. Please try again.

Enter an integer for a user ID:9aslj

That was not an integer. Please try again.

Enter an integer for a user ID:100000

That user ID does not exist. Try again.

Enter an integer for a user ID:4.5

That was not an integer. Please try again.

Enter an integer for a user ID: -10

That user ID does not exist. Try again.

Enter an integer for a user ID:-1

That user ID does not exist. Try again.

Enter an integer for a user ID:7

7

note net1.txt contains: 100 10 20 31 41 61 71 92 32 62 82 93 83 94 64 74 58 96 87 8

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!