CS 115 - Lab 6
[Back to CS 115 schedule]
Deadlines
- Writeup and code (lab06c.py): Tu at 2 PM
- Demo (parts A and C): Any lab section, workshop, or open tutoring session before Tu at 2 PM.
Goals
Upon successful completion of this lab, you should be able to understand and write programs
using while (indefinite) loops.
Lab Instructions
Follow the links below to complete each part of this lab.
Setup and practice
- Basic while loops: the Collatz sequence
- Find the largest power of 2 less than a number
- Write a number as the sum of powers of 2
- Submit your assignment