In the rapidly evolving digital era, social media platforms such as Twitter or X have become strategic public spaces for students to express their views, experiences, and criticisms regarding various aspects of academic life. One of the most frequently discussed topics is related to academic assignments, including their workload, relevance, and contribution to students’ understanding of course material. The spontaneous expressions shared on social media contain valuable data that can be scientifically analyzed, particularly to capture students’ perceptions and sentiments toward the learning process. Therefore, sentiment analysis represents a relevant and systematic approach to identifying patterns of student opinions in a measurable and data-driven manner. This study employs a quantitative approach using machine learning methods, specifically the K-Nearest Neighbor (KNN) algorithm, to analyze student sentiment toward academic assignments expressed on the Twitter/X platform. The quantitative approach was selected because it enables the objective processing of numerical data and facilitates statistical interpretation of emerging patterns. Data were collected from student tweets related to academic assignments and subsequently processed through several stages, including text preprocessing, feature extraction, and sentiment classification into positive, neutral, and negative categories. The results indicate that the K-Nearest Neighbor (KNN) algorithm is capable of classifying student sentiment with an accuracy rate of 85%, demonstrating that this method is sufficiently effective for sentiment analysis in an educational context. The sentiment distribution reveals that 30% of students expressed positive sentiment, perceiving academic assignments as relevant and challenging, while 40% showed neutral sentiment. Meanwhile, the remaining 30% conveyed negative sentiment, indicating that assignments were perceived as excessively demanding and less relevant to the learning process. These findings provide important insights for educators and educational institutions in evaluating and designing academic assignments that are more effective, balanced, and aligned with students’ learning needs.