Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how to run all this code in python , please show with output picture 1- import requests response = requests.get('https://api.github.com') print (response.status_code ) 2- import

how to run all this code in python , please show with output picture

1- import requests response = requests.get('https://api.github.com')

print (response.status_code )

2- import requests response = requests.get('https://api.github.com')

if response.status_code == 200: print('Success!')

elif response.status_code == 404: print('Not Found.')

3- import requests response = requests.get('https://api.github.com')

print (response.content)

4- import requests response = requests.get('https://api.github.com')

print (response.text)

5- import requests response = requests.get('https://api.github.com')

print (response.json())

6- import requests response = requests.get('https://api.github.com')

print (response.headers)

7- import requests response = requests.get( 'https://api.github.com/search/repositories', params={'q': 'requests+language:python'}, )

# Inspect some attributes of the `requests` repository json_response = response.json() repository = json_response['items'][0]

print(f'Repository name: {repository["name"]})

print(f'Repository description: {repository["description"]}')

8- import requests r = requests.get('https://identity.ksu.edu.sa/sites/identity.ksu.edu.sa/files/imce _images/ksu_masterlogo_colour_rgb.png')

print(r.content)

f = open('logo.png', 'wb')

f.write(r.content)

f.close()

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

Step: 3

blur-text-image

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxiv Special Issue On Database And Expert Systems Applications Lncs 9510

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Hendrik Decker ,Lenka Lhotska ,Sebastian Link

1st Edition

366249213X, 978-3662492130

More Books

Students also viewed these Databases questions

Question

=+a tadpole into a frog.

Answered: 1 week ago