This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return false if number.class != Fixnum | |
array = number.to_s | |
if array.size == 3 | |
array_checked = [array[0].to_i, array[1].to_i, array[2].to_i, array[0].to_i * array[1].to_i, array[1].to_i * array[2].to_i, array[0].to_i * array[1].to_i * array[2].to_i] | |
elsif array.size == 2 | |
array_checked = [array[0].to_i, array[1].to_i, array[0].to_i * array[1].to_i] | |
else | |
array_checked = [array[0].to_i] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative "coach_answer" | |
# TODO: Implement the program that makes you discuss with your coach from the terminal. | |
puts "What's your question?" | |
message = gets.chomp | |
while message != "I am going to work right now!" | |
puts coach_answer_enhanced(message) | |
puts "What's your question?" | |
message = gets.chomp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def coach_answer(your_message) | |
# TODO: return coach answer to your_message | |
if your_message.include? "?" | |
"Silly question, get dressed and go to work!" | |
else | |
"I don't care, get dressed and go to work!" | |
end | |
end | |
def coach_answer_enhanced(your_message) |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":1678471,"teams":[206,210],"win":["f","t"],"scores":["0","3"],"half_scores":["0","0"],"current_series":0,"series_max":0,"current_half_series":0,"half_series_max":0,"season_id":197,"played_at":"2018-08-03T00:00:00.000Z","league_id":197,"previous_meeting_sitt":0.0,"previous_meeting_half":0.0,"half_percent":45.075,"total_percent":45.2,"score_in_tt":1,"half_null":1,"current_half_percent":0,"team_combination":206210,"half_multiple":0.0},{"id":1678472,"teams":[187,202],"win":["t","f"],"scores":["2","0"],"half_scores":["1","0"],"current_series":0,"series_max":0,"current_half_series":0,"half_series_max":0,"season_id":197,"played_at":"2018-08-04T00:00:00.000Z","league_id":197,"previous_meeting_sitt":0.0,"previous_meeting_half":0.0,"half_percent":29.12,"total_percent":52.31,"score_in_tt":1,"half_null":0,"current_half_percent":0,"team_combination":187202,"half_multiple":0.0},{"id":1678473,"teams":[213,224],"win":["t","f"],"scores":["2","1"],"half_scores":["1","1"],"current_series":0,"series_max":0,"current_half_se |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"score_in_tt":1,"half_null":false,"current_half_percent":100.0,"half_percent":43.405,"previous_meeting_half":33.33333333333333,"previous_meeting_sitt":66.66666666666666,"previous_meeting_half_score":100.0,"previous_meeting_total_score":366.66666666666663,"total_percent":56.730000000000004,"half_multiple":260.43,"half_score":1,"total_score":2,"half_serie_max":6,"current_half_serie":6,"serie_max":6,"current_serie":1},{"score_in_tt":0,"half_null":false,"current_half_percent":0.0,"half_percent":48.685,"previous_meeting_half":25.0,"previous_meeting_sitt":25.0,"previous_meeting_half_score":250.0,"previous_meeting_total_score":400.0,"total_percent":42.105000000000004,"half_multiple":194.74,"half_score":3,"total_score":5,"half_serie_max":4,"current_half_serie":0,"serie_max":7,"current_serie":7},{"score_in_tt":0,"half_null":true,"current_half_percent":44.44444444444444,"half_percent":38.57,"previous_meeting_half":50.0,"previous_meeting_sitt":50.0,"previous_meeting_half_score":50.0,"previous_meeting_total_score":250. |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"score_in_tt":1,"half_null":false,"current_half_percent":100.0,"half_percent":43.405,"previous_meeting_half":33.33333333333333,"previous_meeting_sitt":66.66666666666666,"previous_meeting_half_score":100.0,"previous_meeting_total_score":366.66666666666663,"total_percent":56.730000000000004,"half_multiple":260.43,"half_score":1,"total_score":2,"half_serie_max":6,"current_half_serie":6,"serie_max":6,"current_serie":1},{"score_in_tt":0,"half_null":false,"current_half_percent":0.0,"half_percent":48.685,"previous_meeting_half":25.0,"previous_meeting_sitt":25.0,"previous_meeting_half_score":250.0,"previous_meeting_total_score":400.0,"total_percent":42.105000000000004,"half_multiple":194.74,"half_score":3,"total_score":5,"half_serie_max":4,"current_half_serie":0,"serie_max":7,"current_serie":7},{"score_in_tt":0,"half_null":true,"current_half_percent":44.44444444444444,"half_percent":38.57,"previous_meeting_half":50.0,"previous_meeting_sitt":50.0,"previous_meeting_half_score":50.0,"previous_meeting_total_score":250. |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"score_in_tt":0,"half_null":false,"current_half_percent":37.5,"half_percent":36.655,"previous_meeting_half":28.57142857142857,"previous_meeting_sitt":14.285714285714285,"previous_meeting_half_score":114.28571428571428,"previous_meeting_total_score":271.42857142857144,"total_percent":46.655,"half_multiple":293.24,"half_score":1,"total_score":4,"half_serie_max":8,"current_half_serie":3,"serie_max":7,"current_serie":2,"team_one":"FC Voluntari","team_two":"Poli Iasi","winner_name":"nul","league_percent_half_null":48.598130841121495},{"score_in_tt":1,"half_null":true,"current_half_percent":37.5,"half_percent":40.28,"previous_meeting_half":20.0,"previous_meeting_sitt":80.0,"previous_meeting_half_score":140.0,"previous_meeting_total_score":280.0,"total_percent":48.61,"half_multiple":322.24,"half_score":2,"total_score":2,"half_serie_max":8,"current_half_serie":3,"serie_max":10,"current_serie":6,"team_one":"Jagiellonia","team_two":"Piast","winner_name":"nul","league_percent_half_null":38.38209982788296},{"score_in_t |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"score_in_tt":0,"half_null":false,"current_half_percent":37.5,"half_percent":36.655,"previous_meeting_half":28.57142857142857,"previous_meeting_sitt":14.285714285714285,"previous_meeting_half_score":114.28571428571428,"previous_meeting_total_score":271.42857142857144,"total_percent":46.655,"half_multiple":293.24,"half_score":1,"total_score":4,"half_serie_max":8,"current_half_serie":3,"serie_max":7,"current_serie":2,"team_one":"FC Voluntari","team_two":"Poli Iasi","winner_name":"nul","league_percent_half_null":48.598130841121495,"teams_half_null_percent":45.25},{"score_in_tt":1,"half_null":true,"current_half_percent":37.5,"half_percent":40.28,"previous_meeting_half":20.0,"previous_meeting_sitt":80.0,"previous_meeting_half_score":140.0,"previous_meeting_total_score":280.0,"total_percent":48.61,"half_multiple":322.24,"half_score":2,"total_score":2,"half_serie_max":8,"current_half_serie":3,"serie_max":10,"current_serie":6,"team_one":"Jagiellonia","team_two":"Piast","winner_name":"nul","league_percent_half_null" |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"score_in_tt":1,"half_null":false,"current_half_percent":"0.0","half_percent":0.66,"total_percent":1.75,"half_score":1,"total_score":3,"half_serie_max":0,"current_half_serie":0,"serie_max":0,"current_serie":0,"league_percent_half_null":19.4,"teams_half_null_percent":31.726190476190474,"previous_meeting_half":0.0,"previous_meeting_sitt":0.0,"previous_meeting_half_score":1,"previous_meeting_total_score":3},{"score_in_tt":1,"half_null":true,"current_half_percent":"0.0","half_percent":0.49,"total_percent":1.46,"half_score":0,"total_score":2,"half_serie_max":0,"current_half_serie":0,"serie_max":0,"current_serie":0,"league_percent_half_null":19.4,"teams_half_null_percent":32.103658536585364,"previous_meeting_half":33.33,"previous_meeting_sitt":0.0,"previous_meeting_half_score":3,"previous_meeting_total_score":8},{"score_in_tt":1,"half_null":false,"current_half_percent":"0.0","half_percent":0.75,"total_percent":1.7,"half_score":1,"total_score":2,"half_serie_max":0,"current_half_serie":0,"serie_max":0,"current_seri |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[14006, 14710, 18701, 23084, 23093, 26441, 27050, 27053, 30149, 31520, 31765, 32871, 33280, 33957, 33970, 34508, 36744, 36774, 37180, 38257, 39133, 40304, 40383, 40966, 42967, 43438, 43440, 46033, 47558, 47946, 47947, 49083, 49518, 49519, 49520, 49521, 49522, 49523, 49525, 49526, 52179, 52555, 52558, 52561, 52579, 52580, 53002, 53116, 53950, 54047, 54048, 54049, 54050, 54051, 54052, 54053, 54054, 54055, 54056, 54057, 54058, 54059, 54060, 54061, 54062, 54063, 54064, 54072, 54142, 54143, 54144, 54145, 54149, 54150, 54151, 54152, 54153, 54154, 54155, 54156, 54157, 54158, 54159, 54160, 54161, 54162, 54163, 54164, 54165, 54166, 54167, 54168, 54169, 54170, 54171, 54172, 54173, 54174, 54175, 54176, 54177, 54178, 54179, 54180, 54181, 54182, 54183, 54184, 54185, 54186, 54187, 54188, 54189, 54190, 54191, 54192, 54193, 54194, 54195, 54196, 54197, 54198, 54199, 54200, 54201, 54202, 54203, 54204, 54205, 54206, 54207, 54208, 54209, 54220, 54221, 54224, 54225, 54226, 54228, 54229, 54230, 54231, 54232, 54233, 54234, 54240, 5 |
OlderNewer