Express each of these as a combination of $p$ and $q$. The given question is:
Let $p$ be the proposition “I will do every exercise in this book” and q be the proposition “I will get an “A” in this course.” Express each of these as a combination of $p$ and $q$.
a) I will get an “A” in this course only if I do every exercise in this book.
This is of form $q$ only if $p$
I know the answer is clearly $p\to q$.
But I have the statement: The implication $p\to q$ is the proposition that is false when $p$ is true and $q$ is false, and true otherwise.
If $p$ is true and $q$ is false, the statement is "I will not get an “A” in this course only if I do every exercise in this book", which is false as it contradicts our given statement.
for $p$ and $q$ both true, it gives the given statement. So true.
If both $p$ and $q$ are false, we get "I will not get an “A” in this course only if I will not  do every exercise in this book", which is same as saying "If I will not do every exercise in this book then i will not get “A” in this course"  this sounds true as compare to our given statement.
But what about this statement, when $p$ is false and $q$ is true, which says "I will get an “A” in this course only if I will not  do every exercise in this book", how this statement will be true, I am not getting?
For me this sounds opposite to the previous case, when $p$ and $q$ both are false. Then how both can be true. Where I am wrong, please explain..
Thanks in advance!
 A: 
This is of form 
only if 
I know the answer is clearly  → 

Really?
Then what would be your rendition of   if  ??
Can e.g. 'Jack will win the race only if he trains hard' really be rendered by 'Jack trains hard → he will win the race' ???
Take a look at the chapter on conditionals in any decent intro logic texts ... e.g. Ch. 18 of https://www.logicmatters.net/resources/pdfs/IFL2_LM.pdf
A: Let's think about the falsity conditions of the natural language sentence.

I will get an A in the course only if I do every exercise in the book.

This sentence is false if and only if you can get an A in the course (q) without doing every exercise in the book (p). So, the original sentence is equivalent to $\lnot(q \land \lnot p)$, which is equivalent to $q \to p$.
The related sentence below is false exactly when you do every exercise in the book (p), but fail to get an A (q).

I will get an A in the course if I do every exercise in the book.

The original sentence is equivalent to $\lnot(p \land \lnot q)$, which is equivalent to $p \to q$.

As an addendum, I think it would help to rearrange the sentence so that the conditional clause is first when translating a sentence into logical form. Even if the conditional clause is headed by something weird like an only if.

I will get an A in the course only if I do every exercise in the book.

Is equivalent to

Only if I do every exercise in the book, I will get an A in the course.

This makes the paraphrase into an if easier to see and convince yourself of.

If I get an A in the course, then I did every exercise in the book

