https://colab.research.google.com/If you see a blue "Sign In" button at the top right, click it and log into a Google account.
From the menu, click File, "New notebook".
In the Code box next to the circled arrow, enter this code:
print("Hello, World!")
At the left, click the
circled arrow icon to
run your code.
The words "Hello World" appear below the code, as shown below.
Flag VP 11.1: Help (2 pts)
Run this code:The flag is covered by a green rectangle in the image below.
help()Click the Run button to stop help().
The third line performs a GET request to load my Web page and puts the reply in a variable named "r".
!pip install requests
import requests
r = requests.get("https://samsclass.info")
print()
print(dir(r))
At the top left, click the
triangle-in-circle icon to
run your code.
The library is already installed, so the output shows "Requirement already satisfied" messages.
The last line shows all the possible methods available to examine the reply named "r".
Scroll to the right to see the last three methods, as shown below.
Flag VP 11.2: Requests (8 pts)
Execute this code to see some parts of the reply:The flag is covered by a green rectangle in the image below.
print( r.status_code ) print( r.url )