# Project Stem
Source code for the 2022-23 AP Computer Science A course on Project Stem.
# 📃 About
This page contains the source code to various problems on Project Stem. Organized by unit, you will find the necessary activity files to be compiled by the Java environment, as well as runner files provided by Project Stem to test execution (when available).
The provided source code is intended to work with the 2023 AP CS A course. These solutions may grow out-of-date as new changes are made to the course every year.
# Table of Contents
- Unit 1: Primitive Types
- Unit 2: Using Objects
- Unit 3: Boolean Expressions and If Statements
- Unit 4: Iteration
- Unit 5: Writing Classes
- Unit 6: Array
- Unit 7: ArrayList
- Unit 8: 2D Array
- Unit 9: Inheritance
- Unit 10: Recursion
# 📝 Contributing
Notice a typo or error? Feel free to create an issue !
Please note that support will not be provided for code that does not work in newer lessons.
Navigation Menu
Search code, repositories, users, issues, pull requests..., provide feedback.
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly.
To see all available qualifiers, see our documentation .
- Notifications You must be signed in to change notification settings
Get the Reddit app
Need answers for a code practice? We got you! If you need answer for a test, assignment, quiz or other, you've come to the right place.
Project stem unit 9 test NEED ANSWERS ASAP
Please help this is literally my final
Question 1 In row-major two-dimensional lists, when accessing an element, the __________ is always listed first. Group of answer choices
Flag question: Question 2 Question 2 1 pts For questions 2 and 3, consider the following two-dimensional list:
What is the element at [2][3]?
Group of answer choices
Flag question: Question 3 Question 3 1 pts What is the element at [2][2]? Group of answer choices
Flag question: Question 4 Question 4 1 pts Which of the following is true about lists? Group of answer choices
The first number when accessing a two-dimensional list gives the column number
Lists can only be one-dimensional
Elements refer to the locations of a piece of data in the list
Indexes refer to the locations of a piece of data in the list
Flag question: Question 5 Question 5 1 pts What does it mean for a list to be column-major? Group of answer choices
The elements first refer to the column and then the row
All data is stored in columns
The list has a maximum of one row
The indexes first refer to the column and then the row
Flag question: Question 6 Question 6 1 pts Which of the following lines of code correctly create a two-dimensional list? Group of answer choices
stuff = [3, 4, 5], [6, 3, 1]
stuff = [[3, 4, 5],[6, 3, 1]]
stuff = [3, 4, 5] + [6, 3, 1]
stuff = [3, 4, 5][6, 3, 1]
Flag question: Question 7 Question 7 1 pts Consider the following code:
row.append(1)
row.append(3)
row.append(7)
grid.append(row)
grid.append(row) What are the dimensions of grid (row x column)?
Flag question: Question 8 Question 8 1 pts Consider the following code:
temp.append([53, 12, 24, 86, 23])
temp.append([33, 77, 47, 58, 43])
temp.append([73, 42, 15, 82, 32])
print(temp[2][1]) What is output by the code?
Flag question: Question 9 Question 9 1 pts Consider the following code:
list = [[1,5,3], [4,9,7]]
list.append([2,7,9]) How many rows does the two-dimensional list now contain?
Flag question: Question 10 Question 10 1 pts Consider the following code:
grid.append (["emu", "hedgehog", "cat"])
grid.append (["fish", "frog", "dog"])
grid.append (["rooster", "iguana", "llama"])
print(grid[0][1]) What is output by the code?
Flag question: Question 11 Question 11 1 pts Which of the following statements are true? Group of answer choices
Numerical calculations can be performed using a single for loop on two-dimensional lists
Two-dimensional lists have to store the same type of element across each column
Numerical calculations on two-dimensional lists require two for loops
Two-dimensional lists have to store the same type of element across each row
Flag question: Question 12 Question 12 1 pts Consider the following code that stores values in a 5 x 3 list called grid:
grid.append (["frog", "cat", "hedgehog"])
grid.append (["fish", "emu", "rooster"])
grid.append (["dog", "bird", "rabbit"])
grid.append (["deer", "chipmunk", "opossum"])
grid.append (["fox", "coyote", "wolf"])
for r in range (len(grid)):
for c in range (len(grid[0])):
After this code is run, what values does the list grid hold?
Flag question: Question 13 Question 13 1 pts Which method would correctly swap two rows of a two-dimensional list? Group of answer choices
def swapRows (grid, a, b):
Flag question: Question 14 Question 14 1 pts Which of the following loops would change the list grid to the following values? Assume that grid is already a 2D list with 4 rows and 3 columns.
for r in range(len(grid)):
for c in range(len(grid[0])):
grid[r][c] = f * 2
grid[r][c] = f
grid[r][c] = r + c
Flag question: Question 15 Question 15 1 pts Which of the following loops would change the list grid to the following values? Assume that grid is already a 2D list with 4 rows and 3 columns.
grid[r][c] = c + 1
grid[r][c] = r + 1
grid[r][c] = r
Flag question: Question 16 Question 16 1 pts Consider the following two-dimensional list:
72 57 97 63 85
84 42 90 61 88
98 43 54 86 55
Which loop correctly adds up the values in the third column (beginning with 97)?
for i in range(len(a)):
sum = sum + a[i][2]
sum = sum + a[3][i]
sum = sum + a[i][3]
sum = sum + a[2][i]
Flag question: Question 17 Question 17 1 pts Which of the following loops would correctly initialize a 13 x 15 two-dimensional list to random 2-digit numbers? You can assume the list vals has been declared and random has been imported. Group of answer choices
for r in range(15):
vals.append([])
for c in range(13):
vals[r][c] = random.randint(10,99)
for r in range(13):
for c in range(15):
vals[r].append(random.randint(10,99))
Flag question: Question 18 Question 18 1 pts Consider the two-dimensional list below:
Which position is the number 5 located at?
Flag question: Question 19 Question 19 1 pts Consider the following code:
grid.append([])
grid[0].append(9)
grid[0].append(7)
grid[1].append(5)
grid[1].append(3)
grid[2].append(2)
grid[2].append(8)
grid[3].append(1)
grid[3].append(3) How many rows and columns does this list have?
4 rows and 2 columns
2 rows and 4 columns
4 rows and 4 columns
2 rows and 2 columns
Flag question: Question 20 Question 20 1 pts What type of variable is available to all methods in a program? Group of answer choices
By continuing, you agree to our User Agreement and acknowledge that you understand the Privacy Policy .
Enter the 6-digit code from your authenticator app
You’ve set up two-factor authentication for this account.
Enter a 6-digit backup code
Create your username and password.
Reddit is anonymous, so your username is what you’ll go by here. Choose wisely—because once you get a name, you can’t change it.
Reset your password
Enter your email address or username and we’ll send you a link to reset your password
Check your inbox
An email with a link to reset your password was sent to the email address associated with your account
COMMENTS
Source code for the 2022-23 AP Computer Science A course on Project Stem. - GitHub - ricky8k/APCSA-ProjectStem: Source code for the 2022-23 AP Computer Science A course on Project Stem. ... Unit 8: 2D Array; Unit 9: Inheritance; Unit 10: Recursion; đź“ť Contributing. Notice a typo or error? Feel free to create an issue! Please note that support ...
To iterate through (access all the entries of) a two-dimensional arrays you need _____ for loops. (Enter the number of for loops needed). two. When using for loops and two-dimensional arrays, the outside loop moves across the _____ and the inside loop moves across the _____. rows, columns. About us. About Quizlet ...
public class Captain extends UltimatePlayer. {. private boolean type=false; public Captain (String firstName, String lastName, String position, boolean type) {. super (firstName, lastName, position); } public int throwDisc (int pow) {.
public class U8_L1_Activity_Two { public static int[][] productTable(int r, int c) { // Initialize Variable int[][] arr = new int[r][c]; // Create Product Table for ...
Instructions. In this assignment, you will create a simple class for playing the game battleship. Battleship is played on a square grid of 10 rows and 10 columns, which you will represent using a 2-D array in a class named Board. A separate class, Battleship, will allow you to try playing your game and see whether the methods work as planned.
Biomol Project Report; ... C Programming Assignment 9 2-D Arrays April 2022. For each of the programs assigned below, submit the source code (.c file) and the execution to Canvas under Assignment 9. ... Declare a two-dimensional array in function main (allow the array to contain up to 15 rows and 15 columns) and initialize elements to 0. ...
Source code for the 2022-23 AP Computer Science A course on Project Stem. java computer-science ap-computer-science apcs apcsa edhesive project-stem Updated Jan 13 , 2024; Java ... In writing these methods you will learn how to traverse a two-dimensional array of integers or objects. You will also be introduced to nested loops, binary numbers ...
48. How many columns does the array above have? 4, columns go across and rows go up in down. what is the output? hedgehog. Study with Quizlet and memorize flashcards containing terms like In two-dimensional arrays. the ________ is always listed first, In python arrays are also called, A two-dimensional array is essentially and more.
This page contains the source code to various problems on Project Stem. Organized by unit, you will find the necessary activity files to be compiled by the Java environment, as well as runner files provided by Project Stem to test execution (when available). The provided source code is intended to work with the 2023 AP CS A course.
Study with Quizlet and memorize flashcards containing terms like In two-dimensional lists, the _____ is always listed first., Every row of a 2d list is a(n) _____., A two-dimensional list is essentially: and more.
This is a safe and open environment dedicated to the promotion of project management methodologies, with the purpose of fostering and promoting free discussion about all things project management. Check out r/PMcareers for career related posts.
This repository contains the source code to various problems on Project Stem. Organized by unit, you will find the necessary activity files to be compiled by the Java environment, as well as runner files provided by Project Stem to test execution (when available).
6 This is correct. The length of the array test, is 7. Therefore when the procedure is called, with this array as the argument for the parameter nums, the value of nums.length/2 will be equal to 7/2. Using integer division this evaluates to 3, therefore the for loop runs when k = 0, k = 1 and k = 2 (i.e the values of k less than 3). This means the elements in the array at these indices will be ...
Assignment 9 2D arrays . Does anyone have the code for this assignment. I need help comments sorted by Best Top New Controversial Q&A Add a Comment. More posts you may like. r ... Class Project. See more posts like this in r/EdhesiveHelp. subscribers . Top Posts Reddit . reReddit: Top posts of March 8, 2021.
To solve this problem, you need to create a 2D list with the given cities. First, write a printList() function that takes the list as a parameter and prints it. Then, create a flipOrder() function that reverses the order of each sublist in the original list. Explanation: To solve this problem, you need to create a 2D list with the given cities.
14%9 returns 5. 16%2 returns 8. 2%16 returns 2. array.insert (i, x) adds the (x) in the array at (i) without removing what was already there. remove. removes the first occurrence of the element in a list. Function. A function is a collection of instructions that the program will execute.
Need answers for a code practice? We got you! If you need answer for a test, assignment, quiz or other, you've come to the right place.
find the domain and Technology used inside Chess for class 8 subject AI
Assignment 9 2D Arrays . Python I need it ASAP if anyone can help it will be much appreciated Share Add a Comment. Sort by: Best. Open comment sort options ... It's a successor project to OpenOffice with regular releases, extra features, and improved compatibility (.docx export).
Computer Science Learn with flashcards, games, and more — for free.
Project stem unit 9 test NEED ANSWERS ASAP. Quiz/Test. Please help this is literally my final. Question 1 In row-major two-dimensional lists, when accessing an element, the __________ is always listed first. Group of answer choices. column.