There are $n$ cards on a table in a line, with a positive real written on eachcard. LTF and Sunny are playing a game where they take turns taking away the first or the last card in line. The player that has the bigger sum of all the numberson his cards wins. If LTF goes first, find all $n$ such that LTF can always prevent Sunny from winning, regardless of the numbers written on the cards.
1. **Case 1: \( n \) is odd**

   Suppose \( n \) is odd. Consider the sequence of numbers on the cards as \( a_1, a_2, \ldots, a_n \). We can construct a specific example to show that LTF cannot always prevent Sunny from winning. 

   Let's construct the sequence such that:
   \[
   a_1 = 0, a_2 = 1, a_3 = 1, \ldots, a_{n-1} = 1, a_n = 0
   \]
   Here, the cards at odd positions (1, 3, 5, ..., n) have the value 1, and the cards at even positions (2, 4, 6, ..., n-1) have a very small value close to 0.

   - If LTF always takes the card with value 0 (either \( a_1 \) or \( a_n \)), Sunny can always take the card with value 1.
   - This means that Sunny will end up with a sum of \( \frac{n-1}{2} \) (since there are \( \frac{n-1}{2} \) cards with value 1), while LTF will end up with a sum close to 0.

   Therefore, LTF cannot always prevent Sunny from winning when \( n \) is odd.

2. **Case 2: \( n \) is even**

   Suppose \( n \) is even. Let the sequence of numbers on the cards be \( a_1, a_2, \ldots, a_n \). Define:
   \[
   A = \sum_{i \text{ even}} a_i \quad \text{and} \quad B = \sum_{i \text{ odd}} a_i
   \]

   Since \( n \) is even, LTF can always choose to take cards from either the odd positions or the even positions consistently throughout the game. This strategy ensures that LTF can always achieve either the sum \( A \) or the sum \( B \), whichever is larger.

   - If \( A \geq B \), LTF can always take cards from the even positions.
   - If \( B \geq A \), LTF can always take cards from the odd positions.

   By doing this, LTF ensures that he will always have a sum of at least \( \max(A, B) \), which is greater than or equal to the sum that Sunny can achieve.

   Therefore, LTF can always prevent Sunny from winning when \( n \) is even.

Conclusion:
LTF can always prevent Sunny from winning if and only if \( n \) is even.

The final answer is \( \boxed{ n } \) is even.