4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

AP Computer Science - More Nested Loop Practice and Solutions

![APCSLogo.png](https://steemitimages.com/DQmXNmrb8ug59Z9Kck2Hq8wS9RJASeUFdrxruwWCNW8Fqri/APCSLogo.png)
I used this as a bell work yesterday, maybe similar concepts on a quiz soon! Haha. Analyze, by hand, what each loop below does: ### Ex 1 ![](https://steemitimages.com/DQmaAL5CNFyYfAz6Cjw7Gc4BRaNgW77uDFeyJoLqnhbFubL/image.png) #### Solution ![](https://steemitimages.com/DQmQ4ucjpDpoXk5WHcSxn9sqmDVyt5vqSApibWubFsow2DP/image.png) ### Ex 2 ![Capture.PNG](https://steemitimages.com/DQmXUvZii2SQXMRcMMKxM7GSQFPEs2wZYNrZnHLgxmnEAjN/Capture.PNG) #### Solution This results in an infinite loop unfortunately! Haha. You have to run few it a few times to figure it out! ### Ex 3 ![](https://steemitimages.com/DQmW6c3sFM8kppygJzTwFyqz2ofrCgGd69u4iE8QST1Ze47/image.png) #### Solution ![](https://steemitimages.com/DQmdFVgBddkwR6ugWRtBEePJnCnHFKpzupqaMVsfY5ApfHG/image.png) ### One More Thing... Write a void method that takes two parameters (integers), a number of rows and columns, and prints a block of numbers with that size. #### Solution ![Capture.PNG](https://steemitimages.com/DQmUNnLMVKWs1NMkHhXDLp4hxxic8rvSRJ2fvh7QLKfXxrK/Capture.PNG) #### Output Example for 4 rows and 3 columns ![](https://steemitimages.com/DQmVSAsacSuSDvcLHhUVQVrCVvh7i9BTkNxsvuZDQ5UK3SY/image.png)
![BAR.png](https://steemitimages.com/DQmV1TfqJ7SzYtEtt6pxAAzFGDxT7qr96nBunRh8V5wiMPv/BAR.png)
#### All SteemitEducation Posts ###### Physics Kinematics Video, Circular Motion Video, Forces in 1 & 2 Dimensions Videos, Kinematics Full Lesson, Circular Motion and Gravitation Full Lesson, Kinematics and Forces Quiz, Forces in 1-Dimension, Forces in 2-Dimensions, Basic Physics, Kinematics, and Forces Review, AP Physics Midterm Exam, AP Physics Midterm Exam Solutions ###### Computer Science 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ###### SAT Asymptotes, Composite Functions, Contest 1 - Area, Contest 1 – Winners and Solution, PEMDAS, Systems of Equations, Functions, Exponents, Contest 2 - More Functions, Contest 2 – Winners and Solution, Percents, The Interest Equation, All About Division, Contest 3 - Factoring, Contest 3 – Winners and Solution, Fractional and Negative Exponents, Basic Trig, Contest 4 - Math Vocab, Contest - 5, Contest 5 – Winners and Solution, Contest 6, Contest 6 – Winners and Solution ###### General Math Basics of Algebra, Trigonometry Video, Proof of Quadratic Formula, Factoring Video, Unions and Intersections, Surface Area of a Cylinder, Substitution Video, Combinatorics Basics ###### Graphing from Algebra to Calculus Algebra 1, Algebra 2, Pre-Calculus, Calculus ###### Piloting Airplanes Introduction, Preflight, Requirements, Instruments, Take-Offs and Landings, Why a Plane Can Fly, Reading the Runway, Maneuvers ###### Other Engineering (Isometric) Drawing, Pressure & SCUBA Diving
![BAR.png](https://steemitimages.com/DQmV1TfqJ7SzYtEtt6pxAAzFGDxT7qr96nBunRh8V5wiMPv/BAR.png)
Thank you for your viewing my friends! The support is much appreciated! Learn much and best wishes!
![STMEdu.gif](https://steemitimages.com/DQmVM1RNSZQpF6FNR3FM19o1uxAsSPYQCM4rpKpVvHpAc7L/STMEdu.gif)
![SteemWave.gif](https://steemitimages.com/DQmed33MBGST9sY4zLtpR8UyRT3ZwdGVKWntUApJjAn9pFV/SteemWave.gif)
12 upvotes $0.38

Replies (10)

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: