You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior
The script puts the selected phrase based on the following criteria: #day of the year % #phrases
The problem w/ this approach is that when we add phrases, the result calculation deviates the desired selected phrase as seen in this schema:
If we increment by one the phrases: len(phrases)=36 result=day_of_the_year % len(phrases) # 273 % 36 = 21 output:this is row 21
Desired scenario
• Implement an algorithm to read the phrases and their # of ocurrences
• Pick the phrases w/ lower # of ocurrences
• Pick one randomly from that subgroup
The text was updated successfully, but these errors were encountered:
Current behavior
The script puts the selected phrase based on the following criteria:
#day of the year % #phrases
The problem w/ this approach is that when we add phrases, the result calculation deviates the desired selected phrase as seen in this schema:
day_of_the_year=273
len(phrases)=35
result=day_of_the_year % len(phrases) # 273 % 35 = 28
output:
this is row 28
If we increment by one the phrases:
len(phrases)=36
result=day_of_the_year % len(phrases) # 273 % 36 = 21
output:
this is row 21
Desired scenario
• Implement an algorithm to read the phrases and their # of ocurrences
• Pick the phrases w/ lower # of ocurrences
• Pick one randomly from that subgroup
The text was updated successfully, but these errors were encountered: