National University of Singapore · FACULTY OF COMPUTER SCIENCE

CS1010E Programming Methodology

- one subject, every graph, every model, every mark
6 Chapters29-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
The Complete Exam Bible · Sem 1 AY26/27

CS1010E Overview

Programming Methodology
— Read the program the way Python runs it: one expression, one statement, one state change at a time.
  • National University of Singapore
  • Semester 1, AY2026/27
  • Level 1
  • Python at the command line
  • Closed-book Midterm and exams

What this course teaches

The course materials present CS1010E as the leading introductory course in computing, and it teaches problem solving by computing through the Python programming language.

  • Exams carry most of the grade The Final Exam is 40%, and the Midterm and Practical Exam are 20% each.
  • Every assessment is closed book The Midterm, Practical Exam and Final Exam all forbid notes, so tracing must be automatic.
  • Trace before you type Write each variable's value after every statement; most lost marks come from a state you assumed rather than traced.
  • Assignments count best five Six assignments share 10%, and only the best five of the six count.
CS1010E · National University of Singapore
An independent, AskSia-authored study guide. AskSia is not affiliated with, endorsed by, or sponsored by National University of Singapore; the course code and name are used for identification only.
Assessment

How CS1010E is assessed

ComponentWeightFormat
Assignments (6)10%Best 5 of 6 count.
Tutorial Attendance4%Part of the tutorial strand; tutorials start in Week 3.
ET Exercises5%Tutorial strand; the course notes a graded practical exercise completed during tutorial sessions.
Mock Midterm1%Part of the tutorial strand.
Midterm20%Closed book. Saturday 3 October, 5.00pm to 6.30pm. Topics up to and including Lecture 5.
Practical Exam20%Closed book, in the programming labs. Saturday 24 October, multiple sessions within 12nn to 6pm. Topics up to and including Lecture 8.
Final Exam40%Closed book. Thursday 26 November, 5pm to 7pm.

The published weights total 100%: 10% for assignments, 10% across the three tutorial components, 20% for the Midterm, 20% for the Practical Exam and 40% for the Final Exam. The course states that all three timed assessments are closed book. The assessment table gives no coverage line for the Final Exam, and the course pages reviewed here state no hurdle, minimum mark or pass condition for any component, so none is claimed in either direction; confirm the current position on Canvas. Times are marked tentative in the table and the lesson plan is subject to change over the semester.

40%Final Exam20%Midterm20%Practical Exam10%Assignments10%Tutorialclosed-book assessments together: 80%continuous work: 20%
Current dates · verify in LMS

Current CS1010E dates

DateItemControl
3 October 2026MidtermSaturday, 5.00pm to 6.30pm. Topics up to and including Lecture 5.
24 October 2026Practical ExamSaturday, multiple sessions within 12nn to 6pm in the programming labs. Topics up to and including Lecture 8.
26 November 2026Final ExamThursday, 5pm to 7pm.

Dates are as published in the assessment table and lesson plan published for this offering. Confirm exact deadlines and submission settings in the live LMS.

Contents · every chapter, one map

What CS1010E covers

Six chapters follow the first six lectures in order, from turning a problem into an algorithm, through expressions, sequences, statements and recursion, to objects whose state can change under a second name.

The learning outcomes are practical: analyse the specification of a problem and design an algorithm for it, implement that algorithm with real software tools, trace and test a program until you can show it is correct, and write it in a clean, modular style.

Programs are written from the command line with IPython and a terminal editor rather than inside an integrated development environment, which means you will read error messages and run code yourself from the first week.

How the first six lectures build

Lecture 1 frames programming as turning input into output through an algorithm.

Lecture 2 introduces values, types, operators and the functions that package a calculation. Lecture 3 moves from single values to sequences: strings, tuples, lists and ranges, and the indexing and slicing they share. Lecture 4 is about state, the assignment, conditional and loop statements that change what a name refers to.

Lecture 5 solves a problem by calling a smaller version of the same function, and Lecture 6 shows what happens when two names refer to the same mutable list. The Midterm covers topics up to and including Lecture 5, so the first five chapters of this guide are the Midterm syllabus.

How the grade is built

The Final Exam carries 40% and the Midterm and the Practical Exam carry 20% each.

Six assignments together carry 10%, counting the best five. The tutorial strand carries the remaining 10%: 4% for attendance, 5% for the exercises completed in class and 1% for a mock midterm.

All three timed assessments are closed book, and the Practical Exam is taken at a lab machine, so writing working code under time pressure is itself a skill to rehearse.

What this edition covers

This guide follows Lectures 1 to 6 with the matching tutorials and the first three assignments.

The later lectures in the lesson plan, on list processing, dictionaries, multi-dimensional arrays, searching and sorting, object-oriented programming and algorithm performance, are not yet covered here; use the lesson plan on Canvas to plan revision for them.

Worked example · free

Splitting a duration with integer division and remainder

Q [5 marks]. A timer reports 7384 seconds. Write one Python expression for each of the hours, minutes and seconds it represents, and give the value of each. The step weighting shown here is an AskSia study allocation and is not a University marking scheme.
  • 1Take whole hours with integer division by 3600.
  • 1Keep the leftover seconds with the remainder operator.
  • 2Split the leftover into minutes and seconds the same way.
  • 1Check the parts add back to the total.
Hours are 7384 // 3600, which is 2, because 3600 fits into 7384 twice. The seconds left over are 7384 % 3600, which is 184. Minutes are 184 // 60, which is 3, and the final seconds are 184 % 60, which is 4. Both operators bind as tightly as multiplication and work left to right, so (7384 % 3600) // 60 can also be written 7384 % 3600 // 60 and still gives 3. The check is 2 * 3600 + 3 * 60 + 4, which is 7200 + 180 + 4 = 7384, the original total, so the answer is 2 hours, 3 minutes and 4 seconds.
Sia tip — Use // for the whole part and % for the leftover, then add the parts back to the original total before you move on.
Glossary

Key terms

Algorithm
A finite sequence of well-defined steps that takes input and produces the required output.
Expression
A combination of values, names and operators that Python evaluates to a single value.
Operator Precedence
The rule deciding which operator is applied first when an expression contains several.
Integer Division
The // operator, which divides and keeps only the whole-number part of the quotient.
Slice
A new sequence taken from positions start up to, but not including, end.
Iterable
Any object a for loop can step through one element at a time, such as a string, list or range.
Program State
The values every name refers to at a given moment, changed by each assignment.
Base Case
The input a recursive function answers directly, without calling itself again.
Mutable Object
An object, such as a list, whose contents can be changed in place after it is created.
Aliasing
Two or more names referring to the same object, so a change made through one is seen through all.
FAQ

CS1010E FAQ

How is the course graded and what does each part carry?

The Final Exam carries 40%, the Midterm 20% and the Practical Exam 20%. Six assignments share 10% with the best five counting, and the tutorial strand adds 4% for attendance, 5% for in-class exercises and 1% for a mock midterm, which brings the total to 100%.

Can I bring notes into the Midterm or the Practical Exam?

No. The course states that the Midterm, the Practical Exam and the Final Exam are all closed book. Revise by writing code and traces from memory, since every timed assessment depends on recall and on fluency at the keyboard rather than on looking things up.

Which topics does the Midterm cover and when is it?

The assessment table sets the Midterm on topics up to and including Lecture 5, which are the first five chapters of this guide: problem solving, expressions and functions, sequences, statements and recursion. It is listed for Saturday 3 October from 5.00pm to 6.30pm, carries 20% and is closed book.

Why does a slice stop one position before the end index?

A slice s[a:b] takes positions a, a + 1 and so on up to b minus one. The length of the result is b minus a, which is why s[0:3] holds three characters and why two slices that share a boundary, s[:k] and s[k:], join back into the whole sequence.

How should I trace a loop on paper?

Make one column per variable and one row per pass, and write values only after the statement that changes them has run. Stop when the loop condition becomes false and read the answer from the last row; never predict a final value without the rows.

How do I know a recursive function will stop?

Check two things. A base case must return without calling the function again, and every recursive call must receive an argument that moves strictly closer to that base case. If either fails, Python keeps adding calls until it raises a recursion error.

Why did changing one list also change another list?

Assigning one name to another does not copy a list; both names then refer to one object. An in-place change such as append through either name is visible through both. Make a real copy with slicing or list() when the two must be independent.

Study strategy

How to study for the exam

Type every example from a lecture into IPython before the next lecture and predict its output on paper first. Where your prediction and Python disagree, write a one-line note on why. Those notes, kept per chapter, become the closed-book revision list for the Midterm and the Final Exam.

Study CS1010E with AI

Your AI Computer Science tutor for CS1010E

Stuck on a hard CS1010E question? Sia is AskSia’s AI Computer Science tutor — ask any CS1010E Programming Methodology question and get a clear, step-by-step explanation grounded in how the course is actually taught and assessed. Read this whole study guide free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 18 of your National University of Singapore subjects - and 1,000+ Bibles across every Australian university.
Sia - your CS1010E tutor, unlimited, worked the way the exam marks it
The full 29-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works