id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

halloweenify


Write a method called halloweenify that takes a person's first name and turns it into a halloween-sounding name. There are very specific rule to follow! It is important to first note that all names will start with a capital letter, all other letters will be lower-case, and there will be at least two letters in each person's name. If their name starts with an "A" or "M" add the word "Zombie" in front of their name. All other names get "stien" added directly to the end of the name. If the last letter of the person's first name ends in "e", also add ", Vampire" to the end of their name, but ONLY if they have "Zombie" added to the front. Look at the test data for additional clarification.


halloweenify("Cory") → "Corystien"
halloweenify("Zeus") → "Zeusstien"
halloweenify("Abe") → "Zombie Abe, Vampire"

...Save, Compile, Run (ctrl-enter)

public String halloweenify(String name) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 220

Copyright Nick Parlante 2017 - privacy