Answer is C.)
Simply, because there's no code inside the try block that raises an exception, the except block is not executed, and the code continues to print "3" after executing the try block.
Simply, because there's no code inside the try block that raises an exception, the except block is not executed, and the code continues to print "3" after executing the try block.
π1
As a web developer today, most of your works are related to APIs.
But most of developers don't actually understand what it is. π
When we talk about API, we are usually referring to Web API. π
Web API (Application Programmatic Interface) can provide:
1. Resources, e.g. bus arrival time, restaurant ratings...
2. Services or microservices, e.g. converting coordinates into place names, creating QR codes...
With Web APIs, developers can then easily incorporate these building blocks into other web applications.
π©βπ»There's some features of different Web API, for example:
1. Public vs. private
- Public APIs are available to everyone, but may subject to licenses
- Private APIs are only available to internal developers
2. Free vs. premium
- Premium APIs may charge on-demand
- That's why there's also this term βAPI Economyβ!
There's actually API marketplace and directory site, like
- RapidAPI
- ProgrammableWeb
Here's some example of public API that you can explore:
1. Google (developers.google.com/apis-explorer)
2. Facebook (developers.facebook.com/docs/apis-and-β¦)
3. Data portals of many cities (dataportals.org/search)And you also have to understand what is 'API endpoints'.
API usually provides endpoints as a URI to provide services.
And it needs to be static, without affecting applications built upon β¨And that's why there's a standard for writing API called REST.
REST stands for 'REpresentational State Transfer'.
It's an architectural style of writing APIs.
But most of developers don't actually understand what it is. π
When we talk about API, we are usually referring to Web API. π
Web API (Application Programmatic Interface) can provide:
1. Resources, e.g. bus arrival time, restaurant ratings...
2. Services or microservices, e.g. converting coordinates into place names, creating QR codes...
With Web APIs, developers can then easily incorporate these building blocks into other web applications.
π©βπ»There's some features of different Web API, for example:
1. Public vs. private
- Public APIs are available to everyone, but may subject to licenses
- Private APIs are only available to internal developers
2. Free vs. premium
- Premium APIs may charge on-demand
- That's why there's also this term βAPI Economyβ!
There's actually API marketplace and directory site, like
- RapidAPI
- ProgrammableWeb
Here's some example of public API that you can explore:
1. Google (developers.google.com/apis-explorer)
2. Facebook (developers.facebook.com/docs/apis-and-β¦)
3. Data portals of many cities (dataportals.org/search)And you also have to understand what is 'API endpoints'.
API usually provides endpoints as a URI to provide services.
And it needs to be static, without affecting applications built upon β¨And that's why there's a standard for writing API called REST.
REST stands for 'REpresentational State Transfer'.
It's an architectural style of writing APIs.
Google for Developers
Google APIs Explorer | Google for Developers
The Google APIs Explorer is is a tool that helps you explore various Google APIs interactively.
Answer is 8 64
πThe code defines a Square class with a method getArea that calculates the area of a square using the side attribute.
πAn instance of the Square class is created which is obj, It has side = 8,
πits area is calculated by calling getarea.
πThe code defines a Square class with a method getArea that calculates the area of a square using the side attribute.
πAn instance of the Square class is created which is obj, It has side = 8,
πits area is calculated by calling getarea.
What will be the output of the following code:
my_list = [1, 2, 3, 4, 5]
print(my_list[1:4])
a) [1, 2, 3]
b) [2, 3, 4]
c) [2, 3]
d) [1, 3, 4]
my_list = [1, 2, 3, 4, 5]
print(my_list[1:4])
a) [1, 2, 3]
b) [2, 3, 4]
c) [2, 3]
d) [1, 3, 4]