Skip to content

Instantly share code, notes, and snippets.

@FFFiend
Created January 30, 2024 13:14
Show Gist options
  • Save FFFiend/98e09e0669b8be40fb4d5c5ad290cf14 to your computer and use it in GitHub Desktop.
Save FFFiend/98e09e0669b8be40fb4d5c5ad290cf14 to your computer and use it in GitHub Desktop.
Owais Quiz 4a Q2
set.seed(71)
num_friends = 20
edward_measurements <- rnorm(num_friends, mean = 180, sd = 5)
hugo_measurements <- rnorm(num_friends, mean = 180, sd = 11)
lucy_measurements <- rnorm(num_friends, mean = 180, sd = 7)
height_data <- data.frame(
Edward = edward_measurements,
Hugo = hugo_measurements,
Lucy = lucy_measurements
)
# dataframe showing measurements from Edward, Hugo and Lucy for each student.
print(height_data)
if(max(select(height_data,Edward) <= 200)){
print(TRUE)
}else{
print(FALSE)
}
if(max(select(height_data,Lucy) <= 200)){
print(TRUE)
}else{
print(FALSE)
}
if(max(select(height_data,Hugo) <= 200)){
print(TRUE)
}else{
print(FALSE)
}
@FFFiend
Copy link
Author

FFFiend commented Jan 30, 2024

Note on LLM usage: ChatGPT-3.5 was used to figure out parts of this question.

Here is the chat link: https://chat.openai.com/share/1a92da5f-9bfe-4082-945f-41655095e95f

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