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
library(tidyverse) | |
library(lubridate) | |
library(bigrquery) | |
library(tibble) | |
# use your project ID here | |
project <- "project-id" # put your project ID here | |
# query all Bitcoin data | |
sql <- "SELECT |
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
PlayGame <- function(winnings=0, turn=1) { | |
if(sample(0:1, 1)) { | |
winnings <- winnings + (2^turn) | |
turn <- turn + 1 | |
PlayGame(winnings, turn) | |
} | |
else { | |
winnings | |
} | |
} |