Write a function in Java that implements the following logic: Given a number n, return true if n is in the range 1..10, inclusive. Unless...
CodeWorkout Exam 2 Practice
Score: 0 / 16.0
Exercises
Write a function in Java that implements the following logic: We are having a party with amounts of tea and candy. Return the int outcome...
Write a function in Java that implements the following logic: Your cell phone rings. Return true if you should answer it. Normally you...
Write a function in Java that implements the following logic: Given three ints, a, b, and c, return true if b is greater than a, and c is...
Write a function in Java that implements the following logic: Given a string and an int n, return a string made of n repetitions of the...
Given two strings, return true if either of the strings appears at the very end of the other string, ignoring upper/lower case...
Given a string of any length, return a new string where the last 2 chars, if present, are swapped, so "coding" yields "codign".
Given two strings, word and a separator sep, return a big string made of count occurrences of the word, separated by the separator...
Given a string, return a string where for every char in the original, there are two chars.
Given two strings, base and remove, return a version of the base string where all instances of the remove string have been removed (not...
Given a string, return true if the number of appearances of "is" anywhere in the string is equal to the number of appearances of "not"...
We'll say that a "triple" in a string is a char appearing three times in a row. Return the number of triples in the given string. The...
Given a day number (1-7), return the day of the week ("Sunday", "Monday", etc.). If an invalid day number is provided, return "Invalid".
...Given two integers low and high representing a range, return the sum of the integers in that range. For example, if low is 12 and high is...
Given an integer num, return the sum of the multiples of num between 1 and 100. For example, if num is 20, the returned value should be...
A magic date is one when written in the following format, the month times the date equals the year e.g. 6/10/60. Write code that figures...
 
 
 
