v Input Format For Custom Testing In the first line, there is an integer threshold. v Sample Case 0 Sample Input For Custom Testing 10 Sample Output ерaga panny olalonde WisNorCan dmmalam replicatorblog vladikoff mpweiher coloneltcb guelo Explanation The threshold value is 10, so the result must contain usernames of users with the submission count value greater than 10. There are 10 such users and their usernames in the order they first appear in the API response are as listed in Sample Output.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please use python3 to solve this question

Please begin with def getUsernames(threshold):

Please do not use the previous python explanation. It was wrong. thanks!

Input Format For Custom Testing
In the first line, there is an integer threshold.
v Sample Case 0
Sample Input For Custom Testing
10
Sample Output
epaga
panny
olalonde
WisNorCan
dmmalam
replicatorblog
vladikoff
mpweiher
coloneltcb
guelo
Explanation
The threshold value is 10, so the result must contain usernames of users with the submission count value greater
than 10. There are 10 such users and their usernames in the order they first appear in the API response are as listed
in Sample Output.
Transcribed Image Text:Input Format For Custom Testing In the first line, there is an integer threshold. v Sample Case 0 Sample Input For Custom Testing 10 Sample Output epaga panny olalonde WisNorCan dmmalam replicatorblog vladikoff mpweiher coloneltcb guelo Explanation The threshold value is 10, so the result must contain usernames of users with the submission count value greater than 10. There are 10 such users and their usernames in the order they first appear in the API response are as listed in Sample Output.
1. Most Active Authors
Python 3
Autocomplete Ready O
Show apps
1 > #!/bin/python3 -
In this challenge, the REST API contains information about a collection of users and articles they created. Given the
threshold value, the goal is to use the API to get the list of most active authors. Specifically, the list of usernames of
users with submission count strictly greater than the given threshold. The list of usernames must be retumed in the
order the users appear in the results.
10
11
12
# Complete the 'getUsernames' function below.
13
%23
# The function is expected to return a
STRING ARRAY.
# The function accepts INTEGER threshold as
14
To access the collection of users perform HTTP GET request to:
https://jsonmock.hackerrank.com/api/article_users?page=<pageNumber>
15
where <pageNumber> is an integer denoting the page of the results to return.
parameter.
16
23
For example, GET request to:
17
# URL for cut and paste
https://jsonmock.hackerrank.com/api/article_users/search?page=2
18
# https://jsonmock.hackerrank.com/api/
will return the second page of the collection af users. Pages are numbered from 1, so in order to access the first page,
you need to ask for page number 1.
article_users?page=<pageNumber>
19
20
The response to such request is a JSON with the following 5 fields:
def getusernames (threshold):
# write your code here
21
22
23
page: The current page of the results
• per_page: The maximum number of users returned per page.
• total: The total number of users on all pages of the result.
• total_pages: The total number of pages with results.
• data: An array of objects containing users returned on the requested page
24 > if
-_name_
_main__': -
==
Each user record has the following schema:
• id: unique ID of the user
• username: the username of the user
• about: the about information of the user
• submitted: total number of articles submitted by the user
• updated_at: the date and time of the last update to this record
• submission_count: the number of submitted articles that are approved
• comment_count: the total number of comments the user made
• created_at: the date and time when the record was created
::
Transcribed Image Text:1. Most Active Authors Python 3 Autocomplete Ready O Show apps 1 > #!/bin/python3 - In this challenge, the REST API contains information about a collection of users and articles they created. Given the threshold value, the goal is to use the API to get the list of most active authors. Specifically, the list of usernames of users with submission count strictly greater than the given threshold. The list of usernames must be retumed in the order the users appear in the results. 10 11 12 # Complete the 'getUsernames' function below. 13 %23 # The function is expected to return a STRING ARRAY. # The function accepts INTEGER threshold as 14 To access the collection of users perform HTTP GET request to: https://jsonmock.hackerrank.com/api/article_users?page=<pageNumber> 15 where <pageNumber> is an integer denoting the page of the results to return. parameter. 16 23 For example, GET request to: 17 # URL for cut and paste https://jsonmock.hackerrank.com/api/article_users/search?page=2 18 # https://jsonmock.hackerrank.com/api/ will return the second page of the collection af users. Pages are numbered from 1, so in order to access the first page, you need to ask for page number 1. article_users?page=<pageNumber> 19 20 The response to such request is a JSON with the following 5 fields: def getusernames (threshold): # write your code here 21 22 23 page: The current page of the results • per_page: The maximum number of users returned per page. • total: The total number of users on all pages of the result. • total_pages: The total number of pages with results. • data: An array of objects containing users returned on the requested page 24 > if -_name_ _main__': - == Each user record has the following schema: • id: unique ID of the user • username: the username of the user • about: the about information of the user • submitted: total number of articles submitted by the user • updated_at: the date and time of the last update to this record • submission_count: the number of submitted articles that are approved • comment_count: the total number of comments the user made • created_at: the date and time when the record was created ::
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY