Our sections are 50-minute discussions led by section leaders each week in which the SL and students work together to solve problems. After Week2 Tue you can log in to our CS 198 site to see what section date/time/room you are in.
Loading ...
We will not hold section during the first week of the quarter. Sections begin during Week 2.
Suggested optional pre-section practice problem:
The following screenshots show the effects of these buttons.
If you want to work on this week's section problems in CodeStepByStep, here are direct links to each problem.
(This week's exercises are hard to test in CodeStepByStep because they use GUIs.
You should test them manually in Eclipse instead using the provided ZIP project.)
Suggested optional pre-section practice problem:
If you want to work on this week's section problems in CodeStepByStep, here are direct links to each problem.
Suggested optional pre-section practice problem:
Critter class named Skunk is an attempt to make a critter that goes ..."
If you want to work on this week's section problems in CodeStepByStep, here are direct links to each problem.
(You may want to test Critter problems manually in Eclipse instead using the provided ZIP project.)
Suggested optional pre-section practice problem:
for loop necessary to create and initialize the following integer array: ..."
If you want to work on this week's section problems in CodeStepByStep, here are direct links to each problem.
(This week's exercises are hard to test in CodeStepByStep because they use animation or events.
You may want to test them manually in Eclipse instead using the provided ZIP project.)
Suggested optional pre-section practice problem:
If you want to work on this week's section problems in CodeStepByStep, here are direct links to each problem.
(This week's exercises are hard to test in CodeStepByStep because they use animation or events.
You may want to test them manually in Eclipse instead using the provided ZIP project.)
Suggested optional pre-section practice problem:
If you want to work on this week's section problems in CodeStepByStep, here are direct links to each problem:
Suggested optional pre-section practice problems:
Write a variation of the book's exercise where you print all of the numbers in the range, separated by spaces. Use a loop to print the numbers. But for multiples of three print "Fizz" instead of the number, and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". The output would be:
1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 17 Fizz 19 Buzz Fizz 22 23 Fizz Buzz 26 Fizz 28 29 FizzBuzz 31 32 Fizz 34 Buzz Fizz 37 38 Fizz Buzz 41 Fizz 43 44 FizzBuzz 46 47 Fizz 49 Buzz Fizz 52 53 Fizz Buzz 56 Fizz 58 59 FizzBuzz 61 62 Fizz 64 Buzz Fizz 67 68 Fizz Buzz 71 Fizz 73 74 FizzBuzz 76 77 Fizz 79 Buzz Fizz 82 83 Fizz Buzz 86 Fizz 88 89 FizzBuzz 91 92 Fizz 94 Buzz Fizz 97 98 Fizz Buzz
("FizzBuzz" is a commonly known problem. Many companies actually ask their interview candidates to solve it, and surprisingly a large number of applicants are unable to do so. It's considered a good "weed-out" problem because anybody with a CS degree ought to know how to solve a problem like this.)
countDigits(n) that ..."
(See book Figure 4-6 for a helpful example to get you started.
Can you write a version that handles negative numbers?)
If you want to work on this week's section problems in CodeStepByStep, here are direct links to each problem:
Suggested optional pre-section practice problems: If you want to try a practice exercise to help you be ready for section, check out these ones. This is optional and not required; you do not have to do it, and you receive no points for doing it. You can write your answer in the Eclipse editor or in our CodeStepByStep tool. If you ever want more extra problems, look at the end of the relevant chapters in the textbook.
1 + 2 * 3 + 4
-----
1 + 6 + 4
-------
7 + 4
----------
11
(The "Section 1 Handout" problems from the PDF document above are the problems that you'll work on in your section this week with the section leader. You don't need to work on any of those before your section, though you can optionally read them ahead of time if you like.)
If you want to work on this week's section problems in CodeStepByStep, here are direct links to each problem:
You are expected to follow the Stanford Honor Code.
Remember that we run similarity-detection software over all solutions, including this quarter and past quarters, as well as any solutions we find on the web.
If you need help solving an assignment, we are happy to help you. You can go to the LaIR, or the course message forum, or email your section leader, or visit the instructor / head TA during office hours. You can do it!
See Course Information handout for full Honor Code policies, or email us if you have any questions.
