Computers and Technology, 30.03.2020 17:45 bedsaul12345
The count_users function recursively counts the amount of users that belong to a group in the company system, by going through each of the members of a group and if one of them is a group, recursively calling the function and counting the members. But it has a bug! Can you spot the problem and fix it?
This is the code :
def count_users(group):
count = 0
for member in get_members(group):
count += 1
if is_group(member):
count += count_users(member)
return count
print(count_users("sales")) # Should be 3
print(count_users("engineering")) # Should be 8
print(count_users("everyone")) # Should be 18
Answers: 2
Computers and Technology, 23.06.2019 02:30
Research data that is presented using descriptive language is said to be
Answers: 2
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
Computers and Technology, 24.06.2019 01:00
What shows the web address of the page that is currently displayed in the workspace? status window toolbar location bar internet box
Answers: 1
The count_users function recursively counts the amount of users that belong to a group in the compan...
History, 12.02.2021 14:00
Social Studies, 12.02.2021 14:00
Spanish, 12.02.2021 14:00
Mathematics, 12.02.2021 14:00
Biology, 12.02.2021 14:00
Physics, 12.02.2021 14:00
Mathematics, 12.02.2021 14:00
Business, 12.02.2021 14:00
Mathematics, 12.02.2021 14:00