john kidwell

Greenhorn
+ Follow
since Nov 09, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by john kidwell

I tried doing this and I know I'm doing this wrong but am I going in the right direction?



And also thank you campbell for editing my post. I'm kind of new to the website.
10 years ago
Hey, So in my prompt output is supposed to be


The following states had these presidents born in them:

Arkansas Clinton
California Nixon
Connecticut Bush_GW
Georgia Carter
Hawaii Obama
Illinois Reagan
Iowa Hoover
Kentucky Lincoln
Massachusetts Bush_GHW Kennedy
Missouri Truman
Nebraska Ford
New_Hampshire Pierce
New_Jersey Cleveland
New_York Fillmore Roosevelt_F Roosevelt_T VanBuren
North_Carolina Johnson_A Polk
Ohio Garfield Grant Harding Harrison_B Hayes McKinley Taft
Pennsylvania Buchanan
Texas Eisenhower Johnson_L
Vermont Arthur Coolidge
Virginia Taylor Tyler Wilson

List of presidents and the state each was born in:

Arthur Vermont
Buchanan Pennsylvania
Bush_GHW Massachusetts
Bush_GW Connecticut
Carter Georgia
Cleveland New_Jersey
Clinton Arkansas
Coolidge Vermont
Eisenhower Texas
Fillmore New_York
Ford Nebraska
Garfield Ohio
Grant Ohio
Harding Ohio
Harrison_B Ohio
Hayes Ohio
Hoover Iowa
Johnson_A North_Carolina
Johnson_L Texas
Kennedy Massachusetts
Lincoln Kentucky
McKinley Ohio
Nixon California
Obama Hawaii
Pierce New_Hampshire
Polk North_Carolina
Reagan Illinois
Roosevelt_F New_York
Roosevelt_T New_York
Taft Ohio
Taylor Virginia
Truman Missouri
Tyler Virginia
VanBuren New_York
Wilson Virginia

These presidents were born before the states were formed:

Adams_J
Adams_JQ
Harrison_W
Jackson
Jefferson
Madison
Monroe
Washington

These states had no presidents were born in them:

Alabama
Alaska
Arizona
Colorado
Delaware
Florida
Idaho
Indiana
Kansas
Louisiana
Maine
Maryland
Michigan
Minnesota
Mississippi
Montana
Nevada
New_Mexico
North_Dakota
Oklahoma
Oregon
Rhode_Island
South_Carolina
South_Dakota
Tennessee
Utah
Washington
West_Virginia
Wisconsin
Wyoming



and I'm hardcoding my code with this text file :

Virginia Tyler Taylor Wilson
Ohio Grant Hayes Garfield Harrison_B McKinley Taft Harding
Massachusetts Kennedy Bush_GHW
New_York VanBuren Fillmore Roosevelt_T Roosevelt_F
North_Carolina Polk Johnson_A
Texas Eisenhower Johnson_L
Vermont Arthur Coolidge
Arkansas Clinton
California Nixon
Connecticut Bush_GW
Georgia Carter
Hawaii Obama
Illinois Reagan
Iowa Hoover
Kentucky Lincoln
Missouri Truman
Nebraska Ford
New_Hampshire Pierce
New_Jersey Cleveland
Pennsylvania Buchanan



I've been able to get the first two outputs correctly, though I can't get the second or third one. The third output is asking me to

"Print a sorted list of presidents who have no birth state associated with them. These presidents were actually born on this continent but were born before the states were created."


and the fourth prompt asks

Print a sorted list of states that have no president born in them. You may use the allstates.txt file for this.



Here's my code:


Does anyone know how I can go about trying to solve this problem?
10 years ago
My prompt is to use the text files:



and



and get this output:



But my output is coming out like this:


What am I doing wrong??

Here's my code:


10 years ago
I tried printing it differently but I now i got an output of



How did you build your arraylist to print it correctly?
10 years ago
Hey I have the same prompt as this and I'm looking at your code. I have it all coming out correctly though it's not matching the correct output. My output is



but I want my output to be




I feel like it's something small. But I'm not sure what it is.
10 years ago
Hi I need some help. I made this code to look through a jumbles.txt and a dictionary.txt and match the words together that were similar. Now my teacher wants me to change my code so that it uses hashmaps. Do you know how i could go about doing this? Here's my code

10 years ago