Could you please write an email to my computer science professor requesting him for a recommendation letter? Remember to be extremely polite while doing so. Also, I want to send him the email when the term ends. Therefore, try to compliment him on his teaching style too!
Dear Professor [Insert Professor's Name],

I hope this email finds you well. As the semester comes to a close, I wanted to take a moment to express my gratitude for your exceptional teaching throughout the term. Your lectures were engaging and your passion for computer science truly shone through.

As I look towards the future, I am planning to apply for [insert purpose of recommendation letter] and was wondering if you would be willing to write a letter of recommendation for me. I understand that this is a significant request and I would be honored to have your support in this endeavor.

If you are willing to write me a letter of recommendation, please let me know what materials you require from me, and if there is anything that I can do to assist you in this process. I am more than happy to provide you with any additional information or materials that may be helpful.

Thank you once again for being an outstanding professor and for your consideration of my request.

Sincerely,
[Insert Your Name]
awesome, thank you!
You're welcome! Let me know if you have any revisions.