Computer Science A
Course Progress
0/0
OCS Build and Lesson
Code Runner - Java
Code Runner - Examples
Code Runner - JavaScript
FRQ - Methods and Control Structures
Challenge Submission Test
2021 FRQ 3
2023 FRQ 3
2024 FRQ 3
2024 FRQ 2
2024 FRQ 1
2024 FRQ 4
FRQ 2 - Sign Class
2023 FRQ 1
2021 FRQ 2
2019 FRQ 4
2019 FRQ 2
2019 FRQ 1
2016 FRQ 3
2018 FRQ Question 4
2018 FRQ Question 3
2018 FRQ Question 2
2018 FRQ Question 1
2017 FRQ 4
2017 FRQ 3
2017 FRQ Question 2
2017 FRQ 1
2016 FRQ 4
2016 FRQ 2
2016 FRQ Q1
FRQ - 2D Arrays
FRQ - ArrayLists
2025 FRQ 4
2025 FRQ 3
2025 FRQ 2
2025 FRQ 1
FRQ - Classes
FRQ - Array
2023 FRQ 4
2022 FRQ 4
2022 FRQ 3
2022 FRQ 2
2022 FRQ 1
2021 FRQ 4
2021 FRQ 1
2015 FRQ 4
2015 FRQ 2
2015 FRQ 1
2015 FRQ 3
2014 FRQ Q2 - Writing a Class
2019 FRQ 3
2014 FRQ 1
Sprint View
Week 19
Challenge Submission Test
Challenge Submission Test
1 min read
- Challenge Submission Test
- Challenge 1: Hello World
- Code Runner Challenge
- Challenge 2: Sum of Two Numbers
- Code Runner Challenge
- Challenge 3: FizzBuzz
- Code Runner Challenge
- Submit Your Work
- Challenge 1: Hello World
Challenge Submission Test
This notebook tests the new challenge submission feature. When challenge_submit: true is set in the frontmatter:
- Each code runner gets a Submit Challenge button
- At the bottom, there’s a Submit All Challenges button
Challenge 1: Hello World
Code Runner Challenge
Write a Hello World program
View IPYNB Source
// CODE_RUNNER: Write a Hello World program
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
HelloWorld.main(null);
Lines: 1
Characters: 0
Output
Click "Run" in code control panel to see output ...
Challenge 2: Sum of Two Numbers
Code Runner Challenge
Create a method that adds two numbers
View IPYNB Source
// CODE_RUNNER: Create a method that adds two numbers
public class Calculator {
public static int add(int a, int b) {
// TODO: Implement this method
return 0;
}
public static void main(String[] args) {
System.out.println("5 + 3 = " + add(5, 3));
}
}
Calculator.main(null);
Lines: 1
Characters: 0
Output
Click "Run" in code control panel to see output ...
Challenge 3: FizzBuzz
Code Runner Challenge
Implement FizzBuzz for numbers 1-15
View IPYNB Source
// CODE_RUNNER: Implement FizzBuzz for numbers 1-15
public class FizzBuzz {
public static void main(String[] args) {
for (int i = 1; i <= 15; i++) {
// TODO: Print "Fizz" for multiples of 3
// Print "Buzz" for multiples of 5
// Print "FizzBuzz" for multiples of both
// Otherwise print the number
System.out.println(i);
}
}
}
FizzBuzz.main(null);
Lines: 1
Characters: 0
Output
Click "Run" in code control panel to see output ...
Submit Your Work
Submit all your code challenges for this lesson.