Pattie gets a monthly allowance of $35. 1/5 of that amount is $7, which Patty spends on snacks each week for some number x of weeks.

Assuming Patty gets an allowance at the beginning of each month, after 3 1/2 months Patty has received 4 allowances = 4 x $35 = $140. Since Patty has $59.50 left at the end of the 3 1/2 months, Patty spent at most $140 - $59.50 = $80.50 on snacks. The largest multiple of $7 less than $80.50 is 11 x $7 = $77, so Patty bought snacks for 11 weeks. Or, if you allow fractional week spending, Patty bought snacks for 11 1/2 weeks, since 11.5 x $7 = $80.50.

Formula for solving for x:

x = ( (4 x $35) - $59.50 ) / $7, where 4 in this formula is 3 1/2 rounded up to the nearest integer.

x = 11.5 or 11 if rounded down to the nearest integer.