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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started