Creation for new maximum and minimum for continuous functions questions (1)

a) $f : (0, 4) \to \Bbb R$ is continuous and attains a maximum value of $1$ and a minimum value of $0$.
b) $f : [0, 4] \to \Bbb R$ attains a minimum, but fails to attain a maximum.
c) $f : [0, \infty) \to \Bbb R$ is continuous, but attains neither a maximum nor a minimum.
  ** DO NOT NEED ANSWERS FOR THEM.** I want your help to twist the questions a little bit with the goal to get another set of questions with more difficulty or similar difficulty and requires different tricks to solve the questions. Please provide the answers and explanation too

 A: OK, here is one contribution, that bears a resemblance to one of your questions.  Find a function $f: [-1,1]\to \mathbb{R}$ which attains a maximum but not a minimum.
Note that a functions which is continuous on a closed (bounded) interval must attain a maximum and a minimum on that interval. So our function $f$ cannot be continuous on the interval $[-1,1]$. 
Look for example at the function $\frac{1}{x^2-1}$, noting it is not defined at $\pm 1$. This reaches a maximum at $x=0$, and becomes large negative as $x$ approaches $-1$ from the right, or $1$ from the left. 
Now let $f(x)=\frac{1}{x^2-1}$ for $-1\lt x\lt 1$, let $f(-1)=-99$, and $f(1)=17$.
Then $f$ reaches a maximum at $x=1$, and does not have a minimum. 
Or else we could let $f(x)=-\frac{1}{x^2}$ when $0\lt |x|\le 1$, and let $f(0)=-17$. 
Or else we could let $f(x)=\frac{1}{x-1}$ when $-1\le x\lt 1$, and let $f(1)$ be our favourite number. 
Or else we can use geometry. Think of a function that climbs linearly in the interval $(-1,0]$, and then falls linearly in $(0,1)$, such as $f(x)=1-|x|$. We can ensure the function does not attain a minimum in our interval by letting $f(-1)=f(1)=1/4$. 
