Skip to content

Commit fe158ad

Browse files
authored
python multiline string
1 parent 384b183 commit fe158ad

File tree

1 file changed

+11
-28
lines changed

1 file changed

+11
-28
lines changed

Logs-Analysis.py

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,18 @@
66
'''
77
import psycopg2
88

9-
def main():
10-
11-
question1 = "1. What are the most popular three articles of all time?\n\
12-
Which articles have been accessed the most?\n\
13-
Present this information as a sorted list with the most popular article at the top\n"
14-
'''
15-
Example:
16-
"Princess Shellfish Marries Prince Handsome" — 1201 views
17-
"Baltimore Ravens Defeat Rhode Island Shoggoths" — 915 views
18-
"Political Scandal Ends In Political Scandal" — 553 views
19-
'''
20-
21-
question2 = "2. Who are the most popular article authors of all time?\n\
22-
That is, when you sum up all of the articles each author has written, which authors get the most page views?\n\
23-
Present this as a sorted list with the most popular author at the top.\n"
24-
'''
25-
Example:
26-
Ursula La Multa — 2304 views
27-
Rudolf von Treppenwitz — 1985 views
28-
Markoff Chaney — 1723 views
29-
Anonymous Contributor — 1023 views
30-
'''
9+
def main():
10+
question1 = """ 1. What are the most popular three articles of all time?
11+
Which articles have been accessed the most?
12+
Present this information as a sorted list with the most popular article at the top"""
13+
14+
question2 = """2. Who are the most popular article authors of all time?
15+
That is, when you sum up all of the articles each author has written, which authors get the most page views?
16+
Present this as a sorted list with the most popular author at the top."""
3117

32-
question3 = "3. On which days did more than 1% of requests lead to errors?\n\
33-
The log table includes a column status that indicates the HTTP status code that the news site sent to the user's browser.\n"
34-
'''
35-
Example:
36-
July 29, 2016 — 2.5% errors
37-
'''
18+
question3 = """3. On which days did more than 1% of requests lead to errors?
19+
The log table includes a column status that indicates the HTTP status code that the news site sent to the user's browser."""
20+
3821

3922

4023

0 commit comments

Comments
 (0)