| CPSC 115L: Introduction to Computing | Fall 2010 |
For values < 10, there is no need to print the leading zeros. As before, first write down your I/O specification and algorithm in pseudocode. Then implement your algorithm in a Python script named run.py. Run your script with five test cases, and save the snapshots of your test runs in a text file named run.out. As done in laboratories, put a file header at the top of each file.Enter the hour of the start time: 6 Enter the minute of the start time: 52 Enter the number of miles I will run at tempo: 2 If I start at 6 : 52 AM and run 2 miles at tempo, then I will be home at 7 : 22 : 54 AM.
115The hexadecimal notation, whose base is 16, is another common way to represent numbers in computing. In this notation, there are 16 possible values for a single digit: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. Repeat the above exercise to express the given integers in the hexadecimal notation.
1823
2010
1048576
1048575
|
|
CPSC 115L home page |
|
|