# A set of constants, each representing a list index for station information. ID = 0 NAME = 1 LATITUDE = LONGITUDE = 3 САРАCITY 3D 4 2 BIKES_AVAILABLE = 5 DOCKS_AVAILABLE 6. NO_KIOSK = 'SMART' # For use in the get_lat_lon_distance helper function EARTH_RADIUS = 6371 # SAMPLE DATA TO USE IN DOCSTRING EXAMPLES SAMPLE_STATIONS %3D [7090, 'Danforth Ave / Lamb Ave', 43.681991, -79.329455, 15, 4, 10], [7486, 'Gerrard St E / Ted Reeve Dr', 43.684261, -79.299332, 24, 5, 19], [7571, 'Highfield Rd / Gerrard St E 43.671685, -79.325176, 19, 14, 5]] SMART', HANDOUT_STATIONS = [ [7000, 'Ft. York / Capreol Crt.', 43.639832, -79.395954, 31, 20, 11], [7001, 'Lower Jarvis St SMART / The Esplanade', 43.647992, -79.370907, 15, 5, 10]] %3D
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
![# A set of constants, each representing a list index for station information.
ID = 0
NAME = 1
LATITUDE
%3D
LONGITUDE
3
САРАСITY
4
BIKES_AVAILABLE
%3D
DOCKS_AVAILABLE
%3D
NO_KIOSK
"SMART'
# For use in the get_lat_lon_distance helper function
EARTH_RADIUS
= 6371
# SAMPLE DATA TO USE IN DOCSTRING EXAMPLES
SAMPLE_STATIONS
[7090, 'Danforth Ave / Lamb Ave',
43.681991, -79.329455, 15, 4, 10],
[7486, 'Gerrard St E / Ted Reeve Dr',
43.684261, -79.299332, 24, 5, 19],
[7571, 'Highfield Rd / Gerrard St E - SMART',
43.671685, -79.325176, 19, 14, 5]]
HANDOUT_STATIONS
[7000, 'Ft. York / Capreol Crt.',
43.639832, -79.395954, 31, 20, 11],
[7001, 'Lower Jarvis St SMART / The Esplanade',
43.647992, -79.370907, 15, 5, 10]]](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F65681b52-ebcf-46be-a66e-16072ee652a6%2F67ba557b-ed0d-44f4-8a56-c7b183e2cca8%2Fvujv86q_processed.png&w=3840&q=75)
![def upgrade_stations(threshold: int, num_bikes: int,
stations: List["Station"]) -> int:
'""Modify each station in stations that has a capacity that is less than
threshold by adding num_bikes to the capacity and bikes available counts.
Modify each station at most once.
Return the total number of bikes that were added to the bike share network.
Precondition: num_bikes >= 0
>> handout_copy =
>> upgrade_stations(25, 5, handout_copy)
[HANDOUT_STATIONS[Ø][:], HANDOUT_STATIONS[1][:]]
>>> handout_copy[0]
HANDOUT_STATIONS[0]
==
True
>>> handout_copy[1]
[7001, 'Lower Jarvis St SMART / The Esplanade', \
43.647992, -79.370907, 20, 10, 10]
True](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F65681b52-ebcf-46be-a66e-16072ee652a6%2F67ba557b-ed0d-44f4-8a56-c7b183e2cca8%2Fsoaee8b_processed.png&w=3840&q=75)

Step by step
Solved in 4 steps with 3 images









