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

 

davereed@creighton.edu > appendBangs
prev  |  next  |  chance

appendBangs() -- You are given a String and a non-negative integer, and want to add that many exclamation points (a.k.a. bangs) to the end of the String. Your function should return the appended String.


appendBangs("Hello", 1) → "Hello!"
appendBangs("Hello", 2) → "Hello!!"
appendBangs("Hi there", 5) → "Hi there!!!!!"

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

public String appendBangs(String str, int numBangs) { }

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: 50

Copyright Nick Parlante 2017 - privacy