Computer Science 15-100, Summer 2009
Class Notes: Loops Practice
Loops Practice
- Fun with Loops + Strings
- Print the characters from 'A' to 'Z'
- Print the Unicode values of the characters from 'A' to 'Z'
- Print the characters in a String
- Print the Unicode values of the characters in a String
- Print the uppercase characters in a String
- Determine whether a String is in uppercase
- Convert a String to uppercase
- Confirm the following math facts:
- 1 + ... + n
= n(n+1)/2
- 1/2 + 1/4 + 1/8 + ...
= 1
carpe diem -
carpe diem - carpe diem - carpe diem
- carpe diem - carpe diem -
carpe diem - carpe diem - carpe
diem