Alleged Contradictions in the Qur'an answer
The Sequence of Events in the Children of Israel Worshipping the Calf

The event of worship of the golden calf: The Israelites repented about worshipping the golden calf BEFORE Moses returned from the mountain [7:149], yet they refused to repent but rather continued to worship the calf until Moses came back [20:91]
Verses in question:
7:149 When they repented, and saw that they had erred, they said: "If our Lord have not mercy upon us and forgive us, we shall indeed be of those who perish."
The context of this verse is as follows:
7:148-150. In his absence the people of Moses made a calf from their ornaments -- an image with a hollow sound. Did they not see that it could neither speak to them nor give them guidance? Yet they worshipped it and thus committed [a great] evil. When they repented, and saw that they had erred, they said: "If our Lord have not mercy upon us and forgive us, we shall indeed be of those who perish." And when Moses returned to his people, angry and sorrowful, he said: 'Evil is the thing you did in my absence! Would you hasten the retribution of your Lord? He threw down the Tablets and, seizing his brother by the hair, dragged him closer. 'Son of my mother,' cried Aaron, 'the people overpowered me and almost killed me. Do not let my enemies gloat over me; do not consider me among the wrongdoers'.
The next verse in question is:
20:91. They had said: "We will not stop worshipping it (i.e. the calf), until Mûsa (Moses) returns to us."

Neither of these verses give a chronological sequence for the events, hence there is no contradiction.
1. Verse 20:91 states that at one point during their worship of the calf, some or all of them announced that they intended to persist in this act until the return of Prophet Moses. This does not mean that they did persist in the act, they only intended to at one point in time. Moreover, some may have persisted while some may have repented.

2. Verse 7:149 also does not necessarily imply whether they repented before or after Prophet Moses's return, nor does it imply whether it was the whole group repenting or just a portion of the group. Many conclude that this verse implies that they repented before the return of Prophet Moses simply because the next verse mentions the return of Prophet Moses. All we can conclude from the verses is that at some point in time some of them repented, and at some point in time, Moses returned and was angry. Mufti Muhammad Shafi, the Late Grand Mufti of Pakistan, writes the following in his monumental tafsir:
When the Bani Isra'il were smitten with the mischief of calf-worship Sayyidna Harun (as) as the deputy of Sayyidna Musa (as) remonstrated with them but to no avail. They split into three factions. Those who remained loyal to Sayyidna Harun (as) and refused to be misled by Samiri and who numbered, according to Qurtubi, twelve thousand. The second faction adopted calf-worship with the reservation that if Sayyidna Musa (as), on his return, forbade them they would give it up. The third faction consisted of zealots who believed that Sayyidna Musa (as) would approve of their action and would join them in calf-worship but even if he did not, they themselves would never give up their new faith. (Shafi, Ma'ariful Qur'an, Maktaba-e-Darul-Uloom, Karachi, 2003, vol. 6, p. 149)
So after reading the Qur'anic verse, there are still a number of possibilites left to the reader. They may have all repented before Moses arrived. They may have all repented after Moses arrived. Some may have repented before, while some may have persisted until Moses arrived, which is what Muft Muhammad Shafi suggests. The Qur'an gives no clear chronological sequence, which leads us to our next point.

3. The Qur'an is not clear on the chronological sequence because it has no reason to be. This is not what Allah wants us to ponder over. Rather, we should ponder over the lesson and moral behind the story. As Allah says about the number of sleepers in the story of the sleepers of the cave:
18:22 (Some) say they were three, the dog being the fourth among them; (others) say they were five, the dog being the sixth, guessing at the unseen; (yet others) say they were seven, the dog being the eighth. Say: "My Lord knows best their number; none knows them but a few." So debate not (about their number, etc.) except with the clear proof (which We have revealed to you). And consult not any of them about (the affair of) the people of the Cave.
Allah has purposely not given us these minor details because they are of no benefit to us. We should instead contemplate the message of the Qur'an.

4. Verse 7:149 has been interpreted in different ways as well. For example, Muhammad Asad renders the verse as follows:
4:179 although [later,] when they would smite their hands in remorse,"' having perceived that they had gone astray, they would say, "Indeed, unless our Sustainer have mercy on us and grant us forgiveness, we shall most certainly be among the lost!""'
This interpretation would indicate that this verse foresees a future event- that they would repent when prophet Moses would arrive. And commenting on the phrase in this verse, Walamma suqita fee aydeehim, Muhammad Asad writes:
Lit., "when it was made to fall upon their hands"-an idiomatic phrase denoting intense remorse, probably derived from the striking ("falling") of hand upon hand as an expression of grief or regret. (Asad, Message of the Qur'an, The Book Foundation 2003)
Ibn Kathir Ad-Damishqi (d. 1372CE) also implies the same message in his book Qasas Al-Anbiyah:
This animal was unable even to seak or answer them. It could not benefit them nor harm them, nor did it have any sign of life in itself. Then how could it be a god?
"And when they repented, and saw that they had gone astray, they said: 'If our Lord does not have mercy on us, and does not forgive us, we shall be among the losers.'" (7:149)
When Moses returned to his people, and saw their worship of the calf, he threw down the Tablets that contained the teachings of the Torah. (Ibn Kathir, Stories of the Prophets, Darussalam Publications 2003, p.419)
The underlined phrase seems to imply that he arrived when they were still persisting in the sin. His comment has been included with the context to demonstrate that he made the comment right after verse 7:149, but did not see any conflict between them.