-4

I recently started out to learning Swift which is completely different from my previous work perspective. I found it is interesting like doing the quiz when I am writing the codes..But I have been struggling with this puzzle for a couple of hours now and will be very much appreciate if any of you could help me out.. here is the quiz, and my code below(it looks ridiculous and I have no idea what to do) the question

enter image description here

what I wrote

enter image description here

Nemus
  • 3,879
  • 12
  • 38
  • 57
Laura
  • 11
  • 3
  • 2
    Please don't link out to images -- put all of the information in your question. – Lou Franco Mar 23 '17 at 20:30
  • You need to add strings together like `"hello " + noun`. But in Swift, we usually do `"Hello \(noun), I have a \(color) balloon"` -- you call a function by giving the arguments after the argument name so `madLib(noun: noun)` or `madLib(noun: "book")`, not `madLib(noun: String)` which is for defining funcs, not calling them – Lou Franco Mar 23 '17 at 20:34
  • 1
    thanks for this and the tip.. – Laura Mar 23 '17 at 20:43

1 Answers1

2

It looks like the issue is how you inserted the adverb, adjective and pluralNoun into the string. Try this it works fine.

func generator(adverb: String, adjective: String, pluralNoun: String) -> String {
  return "Whew! I've been \(adverb) learning how to build \(adjective) app with Udacity. I hope they teach me about \(pluralNoun) soon. That would be helpful."
}
zsteed
  • 97
  • 2
  • 6