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

 

jebbert@volusia.k12.fl.us > test2020_11_12_APP1SLHL_exclaim
prev  |  next  |  chance

Write a method that returns a string that consists of the string 'str' followed by 'howMany' number of exclamation marks "!". For example, if 'str' is "Hello" and 'howMany' is 3 you would return "Hello!!!". Look at the test data for further examples. As a precondition you may assume that 'howMany' will be a positive integer.


test2020_11_12_APP1SLHL_exclaim("Icecream", 1) → "Icecream!"
test2020_11_12_APP1SLHL_exclaim("Hello", 3) → "Hello!!!"
test2020_11_12_APP1SLHL_exclaim("Doing great", 1) → "Doing great!"

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

public String test2020_11_12_APP1SLHL_exclaim(String str, int howMany) { }

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