Forum Posts

clarkipeng
Aug 04, 2022
In Java for ACSL
For the last class all you need to fill out is this feedback form
0
1
2
clarkipeng
Aug 01, 2022
In Java for ACSL
Today we did the agram practice problem in class. Problem + Solution HW
0
0
1
clarkipeng
Jul 28, 2022
In Java for ACSL
Today we went over some practice problems for ACSL. Some struggled a bit to find the solution to the problems. The answer to this problem which we went over in class is something like this: (in c++) dist = [450, 140, 120, 320,250, 80]; double mpg = 25, gp = 3.79, mph = 50; //read position 1 and position 2 char a, b; cin>>a>>b; // get indices in array int p1 = a-'A'; int p2 = b-'A'; //iterate through the path to get full distance int distance = 0; for(int i = p1;i<p2;i++){ distance+=dist[i]; } // print answer distance; // distance distance/mph; //time in hours( not fully accurate, take out decimal and multiply by 60 to get minutes then format accordingly) distance/mpg * gp; // price in dollars Your HW for next class
0
0
5
clarkipeng
Jul 21, 2022
In Java for ACSL
Today we learned about various data structures: binary search trees and stacks. The most important part of learning about data structures is understanding how they function on a base level. After that, the programming part comes easily. Resource Video(Stacks + Queues) Video (Binary Search Trees) HW
0
0
4
clarkipeng
Jul 17, 2022
In Java for ACSL
Today we learned about the basics of graph theory, directed graphs, undirected graphs, adjacency matrices, and more. Resource HW Slides (includes kahoot)
0
0
2
clarkipeng
Jul 14, 2022
In Java for ACSL
Digital Electronics in the context of ACSL is essentially Boolean Algebra with an extra step. You just need to recognize the graphical symbols and associate them with their corresponding algebraic expression in order to solve them. Resources HW Junior Division Problem
0
0
3
clarkipeng
Jul 10, 2022
In Java for ACSL
Today we learned about various boolean operations and some identities and laws that are derived from them. We also learned how to use truth tables to solve boolean expressions. One of the more useful laws in boolean algebra is DeMorgan's Law which you will see plenty of in apcs. Info HW
0
0
7
clarkipeng
Jul 01, 2022
In Java for ACSL
Today we did some practice ACSL tests in class. Links to the materials: Practice Test Answer key HW Solution Additional Hw(optional) Answer key Practice coding problem
0
0
2
clarkipeng
Jun 26, 2022
In Java for ACSL
Today we went over Postfix, Prefix, and Infix notation. Resource HW: 1. Convert 5 * 8 / 2 ^ 2 + 4 * 6 to postfix and prefix notation 2. Evaluate the prefix expression: * * + 2 5 * 9 0 ^ 3 2 3. Evaluate the postfix expression: 5 6 * 3 5 * - 2 2 ^ * BONUS: Find the value of X (this time there is only 1 answer!) in the following postfix equation: 5 6 - X * 2 + = -7 Reply with your answers in the comments
0
3
10
clarkipeng
Jun 23, 2022
In Java for ACSL
Today we went over some ACSL problems you may encounter. Those problems include recursive problems and "what does this program do?" problems. It is important to remember that ^ does not represent the XOR function but the power function and that the FOR function's start and end are inclusive. The full description Recursion Resources HW
0
0
5
clarkipeng
Jun 19, 2022
In Java for ACSL
Today we went over if statements and for loops in Java. In java and c-based languages, the for loop contains an initialization, conditional, and an updating condition. Usually, a variable is altered until it doesn't satisfy the conditional statement anymore and the loop is terminated. Likewise, the if statement executes its given code if the boolean condition is satisfied. There are many caveats when it comes to boolean operators. primitives can be compared using the == operator. In contrast, objects like strings and ArrayLists can only be compared with the .equals() function that checks the contents of the object instead of the pointer to the memory of that object. info HW (submit a repl.it link) slides
0
0
3
clarkipeng
Jun 16, 2022
In Java for ACSL
Today we went over Bit String Flicking. There are bitwise operations: OR (|), AND (&), XOR (^), and NOT (~). And there are shifting operations: LSHIFT, RSHIFT, LCIRC, and RCIRC. The order of precedence for these operations can be found here. Kahoot Lecture Notes HW HW answers: ~1 = 0 ~01011 = 10100 10010 | 11010 = 11010 10001 & 01110 = 00000 And I got a bonus question... can anyone find a formula/ pattern for the XOR of all numbers from 0 to x for any positive x? (without searching it up of course). Solution {x,1,x+1,0}[x%4]
0
0
3
clarkipeng
Jun 12, 2022
In Java for ACSL
Today we went over computer number systems: base 2, base 8, and base 16. We went over conversions between these types and addition, multiplication, etc. Lesson Notes(with kahoot) more info HW Be sure to join the LoL discord server and MAKE SURE TO GET YOUR ROLE another acsl problem The solution to 99 is to iterate through your and the dealer's hand one by one and place any card. Add cards to each hand iteratively and once you go above 99, print the answer. HW answers: 10101₂ = 21 309 = 465₈ 1023 is not binary 101110₂ = 56
0
0
3
clarkipeng
Jun 10, 2022
In Java for ACSL
Today we went over the basics of ACSL competitions and Java primitive types. Java primitive types fall into 3 main categories: - integer datatypes (byte, short, int, long) - character datatypes (char) - floating-point datatypes (float, double) Lesson notes can be found here: kahoot ACSL junior practice problem primitive types HW HW answers: 5 is an int 'h' is a char "hi" is a String true is a boolean 19/10 = 1 because int division floors the result 123/2 = 61 because int division floors the result 10.5/5 = 2.1 because float division
0
0
5
c

clarkipeng

Forum Moderator
More actions