Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

practical 2: need feedback on nested loop example #26

Open
EmelineFavreau opened this issue Oct 17, 2017 · 1 comment
Open

practical 2: need feedback on nested loop example #26

EmelineFavreau opened this issue Oct 17, 2017 · 1 comment

Comments

@EmelineFavreau
Copy link
Contributor

It is an example in Nested loop paragraph:

coffee_drinks <- c("latte", "cappuccino", "espresso", "flat white", "cortado")
coffee_places <- c("Infusion", "Ground", "Sugar Cube", "Foxcroft & Ginger", "Sweet")

for (the_drink in 1:length(coffee_drinks)) {
  for (the_place in 1:length(coffee_places)) {
    print(paste("I'd like a", coffee_drinks[the_drink], "from", coffee_places[the_place]))
  }
}

Does it represent what we wanted?

@yannickwurm
Copy link
Member

yannickwurm commented Oct 17, 2017 via email

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

No branches or pull requests

2 participants