Welcome to AP Computer Science A. If you are a student in the class, the first thing you need to do (and which we should have done in class) is set up your GitHub account.
Once you have a GitHub account, click “Log in to GitHub” below to proceed.
If you don’t have a GitHub account yet, please create one and then log in here for further instructions.
Congratulations! You have successfully connected this app to GitHub. However you are not yet a member of the GitHub organization for this class, something Mr. Seibel needs to set up for you.
This is your GitHub profile URL:
Click the clipboard icon to copy it and then submit it at this form so he can add you.
Congratulations! You have successfully connected this app to GitHub. And it looks like you have an invitation to join the GitHub organization for this class. You need to accept that invitation before you can proceed. The invite should be sent to whatever email you used when you created your GitHub account.
I see you are logged into GitHub and a member of the berkeley-high-cs GitHub organization. However there seems to have been some problem finishing the setup for your account. Please let Mr. Seibel know.
This is a tool for the AP Computer Science A class at Berkeley High School. It is intended to provide a simple environment for experimenting with Javascript without all the complexities of a full development environment such as ReplIt or Glitch which we may use later in the year.
It is also designed to take advantage of the browser’s ability to run Javascript natively. It does not need access to a server to run code making in extremely responsive even if the Wifi is flaking out.
Finally, under the covers it is saving work to a GitHub repository in a very simplified workflow that does not depend on immediately learning any git commands. Code written in this environment for each assignment is saved to a directory and branch specific to that assignment each time it is saved. Thus when the assignment is done, it is easy to go to GitHub and create a PR containing just the work on that assignment which can then be commented on and worked on further before it is turned in and merged to main.
You're all set! You don't need to worry about this yet but we have successfully created a GitHub repository for your work:
You can get to it any time by clicking on your GitHub username at the top-right of the screen.
Write a method that takes an array of int
s and returns
the number of prime numbers in the array. You should use the
provided isPrime
method.
Write a method that takes a String
and returns the
number of vowels in the string. You should use the provided
isVowel
method to determine whether a single character string is a vowel.
Write a method that takes a String
and returns the
index of the first vowel in the string. You should use the provided
isVowel
method to determine whether a single character
string is a vowel.
Write a method that takes a String
and returns a
String
consisting of the original
String
with all the vowels removed. You should use the
provided isVowel
method to determine whether a single character string is a vowel.
Write a method that takes an array of String
s and
returns the number of elements in the array that start with a vowel.
You should use the provided isVowel
method to determine
whether a single character string is a vowel.
Write a method that takes an array of String
s and
returns an int
representing the total length of all the
String
s in the array.
Write a method that takes an array of String
s and
returns an array of int
s where each int
is
the index in the corresponding String
of the first
letter “x” or -1 if there is no “x” in the String
.
Write a method that takes two arguments, an array of
String
s and an int
, and returns the number
of String
s in the array whose length is the value given
by the second argument.
Write a method that takes an array of String
s and
returns a new array of String
s that contains only the
elements of the first array whose length is four.
Write a method that takes an array of String
s and
returns a new array of String
s consisting of the all
upper-case version of the String
s in the original
array.
The hailstone sequence is a sequence of numbers generated from a
starting int
value by the following process:
Write a method that takes an int
argument and uses it
as the starting point of a hailstone sequence and returns the length
of the sequence generated including the starting number and the
final 1
.
Using the definition of a hailstone sequence from the
hailstoneLength
, write a method that takes an
int
argument and returns the maximum value emitted in
the sequence before it reaches 1
.
Using the definition of a hailstone sequence from the
hailstoneLength
, write a method that takes an
int
argument and returns an array of int
s
containing the sequence starting at the argument and ending at
1
.
Write a method that takes an array of String
s and
returns an 11 element array of int
s with each element
of the result array containing the number of Strings
in
the argument array of that length except the last element which
should contain a count of all the String
s whose length
is greater than or equal to ten.
Write a void
method takes an array of
String
s and rotates the values in place so that every
element shifts to the position at an index one less than its current
position except the first element of the array which rotates around
to the last position in the array.
Write a void
method takes an array of
String
s and rotates the values in place so that every
element shifts to the position at an index one greater than its
current position except the last element of the array which rotates
around to the first position in the array.
Write as many methods as you can. I don’t expect that many, if any, of you will get through them all. But the more you do the better. When you are done make sure your name is on your page of notes and turn it in and make a PR and request my review.