1. After each meal, I drew a chart with /on a computer that I had bought by paying a lot of money.

2. I drew the chart on the computer after the meal.

3. With the money, I bought a computer, and I drew spending charts on/with it.

4. I earned some money by selling drinks during the summer vacation. I bought a used / secondhand computer with the money. After the meal, I turned on the computer and drew a spending chart on the notepad.

(Are the sentences all correct? Can we use both 'on' and 'with' before 'a computer'?)

It's better to use "on" with "computer" or "the computer" or "a computer."

The sentences are correct and mean approximately the same thing -- with few differences.

You can use either "used" or "second-hand" to describe the computer in #4.

The visual image of drawing a chart "on the computer" could be confusing. For example, I have "Post It" notes on my computer. I assume that you drew the chart on the monitor screen rather than the computer body. For this reason, although "on" is adequate, I would suggest using "with" since it is the instrument used in making the chart. Example 4 is better at clarifying this.

Since the cost is not related to being able to draw a chart (#1), I would suggest breaking it up into two sentences.

I hope this helps a little more. Thanks for asking.

Yes, all of the sentences you provided are grammatically correct. Both "on" and "with" can be used before "a computer" in these sentences. Let me explain the usage of "on" and "with" in these contexts:

1. "I drew a chart with/on a computer that I had bought by paying a lot of money."
- In this sentence, both "with" and "on" can be used interchangeably before "a computer." "With" implies that you used the computer as a tool or instrument to draw the chart, while "on" indicates the surface on which you drew the chart was the computer screen.

2. "I drew the chart on the computer after the meal."
- Here, "on" is used to specify that the chart was directly drawn on the computer screen.

3. "With the money, I bought a computer, and I drew spending charts on/with it."
- Again, "on" and "with" can be used interchangeably. "With it" implies that you used the computer as a tool to draw the charts, while "on it" refers to drawing the charts on the computer screen.

4. "I bought a used/secondhand computer with the money. After the meal, I turned on the computer and drew a spending chart on the notepad."
- Here, "with" is used to indicate that the used/secondhand computer was purchased using the money earned from selling drinks. "On" is then used to specify that the spending chart was drawn on the notepad application or software on the computer.

Overall, both "on" and "with" can be used before "a computer" depending on the context and intended meaning.