Actually, if you say "tu" in the context, you should use "te", and if you say "você", you should use "lhe". If you don't use one of them, as in this example, it can be both, "lhe" or "te". But here in Brazil (in most regions) we use "te" even with "você". In an informal situation, that doesn't really matters.
In Brazil we never use "lhe" (in either form: darei-lhe or lhe darei) when talking (except in a few regions where "tu" is still used). In written form, darei-lhe should be used when it is starting the sentence: Darei-lhe uma caneta.
Now, if it's not at the start, it doesn't really matter which one you use (although putting lhe before the verb would be more common), but bear in mind that this exercise isn't really perfect. Although it's correct, I find it hard to think that anyone would say Eu darei-lhe uma caneta instead of Darei-lhe uma caneta. Using the eu in these situations sounds fairly unnatural, unless you're emphasizing that it's EU who is giving them the pen.
My point being: you asked if "darei-lhe" would be accepted. When using this sentence, we'd very rarely use Eu lhe darei, so, pretty much every single time we would use Darei-lhe uma caneta.
Hope that helps a little! C:
Thanks for your response. But no one has really told me why the pronouns here precede the verb usually in Brasil and follow the Vb in Euro PT? Does it make any difference.? Both regions would know what one is talking about and whether they are a brasilian or a portuguese speaker. Right through this course we are using Eu, Ele, etc but when the meaning is clear do we really need to say them? Most times the Vb ending would give you a clue.
Ok... So if I understood you're having trouble with two things: 1) Why nouns precede the verb in Brazil and follow it in Portugal; and 2) When to omit the pronouns.
It's not right to say this but we, natives, look at the difference between Brazilian and European Portugueses like this: European is old and super correct and Brazilian is modern, evolved, wrong and has differences between speaking and writing.
So, saying things like lhe (or anything that uses "tu", "me/te/lhe") is old-fashioned for Brazilians, but common for Europeans. However, when writing, Brazilians are still required to use lhe (and all the others), because it is the proper way to write Portuguese.
The thing is, in Brazil, it's really hard to know what is accepted and what isn't, because we speak in one way and write in another completely different way. The writing way is really complicated (when compared to the speaking way) and, unfortunately, even though you study it for years in school, not many people actually know how to properly write.
So, the feeling I have is that every year, a little bit more of the Brazilian PT is accepted in writing, and a little bit more the European PT is forgotten - a great example of this is the "você". "Tu" is never used anymore in Brazil, and "você" is perfectly acceptable in writing. Another example is how we have 20+ tenses (I don't even know exactly how many) but we (in Brazil) use only like 7-9 when talking and maybe 12 or so when writing. So there's like 10 tenses that we are allowed to ignore because the language "evolved" xD
Basically, you're allowed to omit them in most cases. But, in some cases, it's preferable to do it, in some cases it's preferable that you don't.
Both ways are ok: I ate pie yesterday = Comi torta ontem == Eu comi torta ontem -- the sentence's emphasis is in the "eating pie" action, rather than in who ate it. Does that make sense?
Preferable to omit: Do they know they are losing? = Eles sabem que (eles) estão perdendo? -- it sounds redundant to say "eles" twice (but it's not actually redundant, so you're grammatically right even if you don't omit the second one)
Preferable NOT to omit: Do they know they are losing? = (Eles) Sabem que estão perdendo? -- This is because saying just "sabem" could be "You know" and it would sound odd to say something ambiguous like this
Preferable NOT to omit: I eat pie = (Eu) Como torta -- This is because it sounds weird to blur out "Como torta", it's feels like it's missing something. Now, saying "Eu como torta" feels like you might be answering "Does anyone eat pie?" or "Do you / Do any of you eat pie?", it feels like an actual sentence and it feels right.
Also, this is not a rule, but it might help you a little: avoid omitting the pronoun when it is the main subject in the sentence (unless it's to be (ser/estar), in which case you can pretty much always omit): Eles sabem que eles estão perdendo? - The first "eles" is the main subject, the second "eles" is also a subject (inside "eles estão perdendo"), but it's not the main one, so it's okay to omit it!
Uhgz... This is a really touchy subject. I can't even imagine what it must feel like to someone who's trying to learn all this xD Feel free to tell me if it's still not clear or if you have any other questions. I'll try my best to answer them C: