Hi
I seem to have different results from the solution notebook. which seems to show
avg ask comments:
14.038417431192661
avg show comments:
10.31669535283993
Screen Link:
Step 4
My Code:
total_ask_comments = 0
for post in ask_posts:
n =int(row[4])
total_ask_comments +=n
print("Total Posts for Ask Posts: " + str(total_ask_comments))
avg_ask_comments = total_ask_comments/len(ask_posts)
print("Avg Posts for Ask Posts: " + str(avg_ask_comments))
total_show_comments = 0
for post in show_posts:
n =int(row[4])
total_show_comments +=n
print("Avg Posts for Show Posts: " + str(total_show_comments))
avg_show_comments = total_show_comments/len(show_posts)
print("Avg Posts for Show Posts: " + str(avg_show_comments))
What I expected to happen:
What actually happened:
Paste output/error here
Total Posts for Ask Posts: 101152
Avg Posts for Ask Posts: 58.0
Avg Posts for Show Posts: 67396
Avg Posts for Show Posts: 58.0