Skip to content

MurrellThomas_Exercise10#1

Open
imurrell wants to merge 1 commit into
qtran4:mainfrom
imurrell:main
Open

MurrellThomas_Exercise10#1
imurrell wants to merge 1 commit into
qtran4:mainfrom
imurrell:main

Conversation

@imurrell
Copy link
Copy Markdown

Submission for exercise 10

# UW and MSU score for data frame
MSU_score[1] = 0
UW_score[1] = 3
for(i in 2:nrow(score_data)){
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can start with both score equal 0 at time 0 or starting with:
MSU_score[1] = 0
UW_score[1] = 0
the time vector now should include the 0 in the beginning as well

# setting a guess vector
guess_vec = 1:100
guess = sample(guess_vec, 1)
guess = as.numeric(guess)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need this line

library(ggplot2)
# Data frame set up
score_data = read.table("UWvMSU_1-22-13.txt", header = TRUE)
MSU_score = integer(nrow(score_data))
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need this line

# Data frame set up
score_data = read.table("UWvMSU_1-22-13.txt", header = TRUE)
MSU_score = integer(nrow(score_data))
UW_score = integer(nrow(score_data))
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need this line

# running through the game
while (counter <= 10){
user = readline(prompt = "Enter a number from 1 to 100: ")
user = as.numeric(user)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need this line

Copy link
Copy Markdown
Owner

@qtran4 qtran4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants