| layout | default |
|---|---|
| title | Lab Check-Off Questions |
| permalink | labquestions/index.html |
| published | true |
{% include nav.html %}
{% include quicklinks.html %}
<script> {% include_relative assets/cs10.js %} </script>All lab check-off deadlines are at 11:59PM. (However, you need to get checked off by a TA or lab assistant, so you last chance to get checked off is during lab or office hours.)
To get checked off, you should prepare answers to the specific questions for each lab. You shouldn't feel compelled to memorize every single detail of lab. The goal here to make sure you're on track with CS10 and you should be comfortable with the higher level concepts for each question. For each lab the first questions are the biggest ideas, and the later questions are for your own benefit and review.
Remember: Even if you miss a check-off deadline, you can still get 50% credit for any lab check off at any time during the semester.
- No questions for this lab!
Required
- Show your field of flowers (last page of lab).
- Why should you Build Your Own Blocks? Give a reason that someone may create a custom block.
- What are some different ways to achieve repetition? Name at least 2.
- Show your random-walk sprite.
- Show your
draw square-leaved flower...block.
More Self-Check Questions
- Did you customize your flower block in any ways? Be creative.
- Show your customized bug dance.
Required
- What is a Boolean? Explain why we use them, and give examples of functions that report a Boolean value.
- Show us the
traffic signal _,letter grade _, andstate of water _blocks. - Explain the difference between a command and a reporter block.
- Show us the
is _ between _ and _ ?block. - Show us your number guessing game.
More Self-Check Questions
- Why do we use the
ifandif-elseblocks? - When do you use a command block, and when do use use a reporter block?
Required
- Name a few of the input types. Why is it important that we specify input types?
- How are global variables different from script variables?
- Show and Explain your Valid-Date Block
- Show and Explain your "sum of two smallest" block.
- Explain the bug(s) in "(Problem 3) Sum of numbers between x and y."
More Self-Check Questions
- Why is the check block useful? And how does it work?
- Why is the broadcast block useful? Give an example of a good situation to use one.
Required
- What is a list? Why would we use a list of 10 elements instead of just making 10 variables?
- What do
map,keep, andcombineeach do? What are their inputs and outputs? What are these types of functions called? - Show us your
acronymblock. - Show us your
expand _block. - What's the difference between the
for eachloop and thefor (i)loop we've used in previous labs?
** More Self-Check Questions **
- Look back at the
swap itemsblock. Why do we need a "temp" variable? - When would we want to use a loop versus a higher order function?
Required
- What is an algorithm? Please give an example both in real life and from class.
- Please show both your “Find the number X in Unsorted List” and “Find the number X in Sorted List” blocks and describe the difference in the algorithms used.
- Are algorithms which are (on average) faster always "better"? Why or why not?
- What might some "trade-offs" to different computer science algorithms be?
- How can abstraction and algorithms relate in computer science?
More Self-Check Questions
- What is memoization? When is it useful?
- If you have an unsorted list, do you think it will be faster to use your “Find the number X in Unsorted List” block, or sort the list and use your “Find the number X in Sorted List”? Remember that sorting takes time.
Required
- Please show me your Non-Gauss and Gauss Add all numbers in. Which was faster? Why?
- Of all the runtimes you have discovered thus far, can you rank them from “fastest” to “slowest”? Why is runtime important for the programs that we create?
- Name the logarithmic time algorithm that we implemented in Lab 6. Explain why this algorithm runs in logarithmic time.
- What is the difference between “Worst-Case” and “Best Case” Runtimes when running the Are the numbers of (LIST) distinct? block? Why?
- What happened with the time it took for your computer to counter up the numbers between 1 and x when you started doubling the numbers? Tripling the numbers? What do you think would happen with the time I multiplied your top number by 8?
More Self-Check Questions`
- Why are constant time algorithms so rare?
- Why are logarithmic time algorithms sought after?
Required
- How does the test block work? What is its domain/range?
- Show us the output of your test block on merge column. Explain why this output makes sense, and how the test block is checking this block.
- How will writing tests help you for the 2048 assignment?
- How do merge up and merge column work? What are the domain/range of each block?
- What is the domain and range of the update display block?
More Self-Check Questions
- What tests could you have written for HW2 (Encryptify)?
- Explain how each of the HW3 blocks (that you are going to fill in as your hw assignment) are supposed to work, to your lab partner(s).
Required
- What is a race condition?
- Is it always true that splitting a task among 10 “workers” is better than splitting it among 5 “workers”?
- What is the difference between determinism and nondeterminism, in the context of concurrency?
- How does Snap! handle concurrency?
- What happened as you added more people in the card sorting activity?
More Self-Check Questions
- What were some strategies your team thought of in the card sorting activity? How do these relate to how a computer handles concurrency?
- Give an example of when concurrency might cause a problem in a computer program.
Required
- Show your final “ttt” block implementation.
- How did one of the questions we asked ourselves before starting tic-tac-toe help us design the program?
- Why did we have variables like “Size”, “Start”, and “Display Width” when designing our board?
- Show your working board game by moving the sprite around the board.
- Explain an advantage of using an underlying board structure when designing a game.
More Self-Check Questions
- Show your neat end-game feature that you added to the maze game.
Required
- Please show me your “crazy-tree” block.
- Why is it important that the inputs to a recursive call be smaller than the original inputs to the function?
- Why is it important that the sprite face the same direction at the end of a recursive function as it faced initially?
- What defines a recursive block? What are the two necessary “cases” that a recursive block must consider? Name and define them.
- Please show me your “snowflake” block.
More Self-Check Questions
- Please shoe me your "C-Curve" block.
Required
- Why do we map the first item of the set in front of a recursive call of
subsets _over the rest of the list? - Explain why the second version of
subsets _only makes 7 calls instead of 64. - Explain how the
sort _block works, how themerge _block works, and how they work together. - Show us the recursive
numbers _block. - Show us the recursive
ends-e _block.
More Self-Check Questions
- Why might we want to write a function recursively instead of iteratively or using a HOF?
- How might we be able to use recursive reporters to improve runtime?
Required
You can get checked off for this lab as long as you show up to lab and work on it. No questions!
Required
- How can we use functions as data in Snap? What does the gray border do?
- What do the
callandrunblocks do? What’s the difference between them? - Show us your
list all factorions between _ and _block. How does this compare to thelist all pandigital numbers between _ and _block? - Show us your
is _ pandigital?block and explain how you made it. - Explain your
min value of _ over all numbers in _block. How could we make a version that maximizes instead of minimizing?
More Self-Check Questions
- How can we store functions as variables or lists? When might it be useful to have a list containing functions?
- What is the domain and range of the
composeblock? How would you construct thecompose-from-listblock?
Required
- What is the difference between the "python", "python file.py", and "python -i file.py" terminal commands?
- What is the difference between the "print" and "return" python commands?
- Show your "reverse_string(string)" function. If you did it iteratively, explain the recursive solution. If you did it recursively, explain the iterative solution.
- Show your "palindrome(string)" function.
- Show your c-curve function and its output.
More Self-Check Questions
- What is the difference between the "=", "!=", and "==" python commands?
- What is the domain and range for the "+" function in python?
Required
- What is the difference between = and == in python?
- Show us the result of running the autograder.
- What is a dictionary?
- What does 0-indexing mean?
Self-Check Questions
- How to open the Python interpreter and run a script.
- How do you make a dictionary, enter a dictionary, and check what is inside your current dictionary?
- How do you define a function in python?
Required
- What are the arguments of the
openfunction and what does it return? - Show us your
izzlefunction. - How do we choose how something is sorted when using the
sortedfunction in Python? - Show us your
top_n_wordsandprint_top_n_wordsfunctions. - Show us your
apply_language_gamefunction.
More Self-Check Questions
- Complete the remove punctutaion section at the bottom of the Counting Words page.
- Write the
top_n_words_exceptfunction at the bottom of the Top Words page.
Required
- What are some important commands that you can use to keep only certain rows in a table?
- Describe the three main steps of working with data as per this lab.
- What commands did you use to find the price of the most expensive listing in San Francisco?
- Show us your scatter plot? What are some things you notice from this plot?