Status: Started
  • Scratchpad.java
  • Unit Test
Font Size
14
Parentheses autocomplete
Wrap lines
Editor
Theme
Code with blocks by default
Console Font Size
12
Console Theme
Display Server Graphics Screen
Show File Tab Bar
Debug Mode
Even Up, Odd Down
Unit Test
public static double evenUp(String phrase)
{
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output
Grading
Docs
Exercise
More
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Pass Test Message

Errors:

This student is viewing this assignment in English. View this page in English?

7 points

The school newspaper wants to publish a story with All of the even index characters (including 0) in uppercase and all the odd index characters in lowercase. KiNd oF lIkE ThIs.

Given a phrase, return the decimal percentage that represents how many characters in the phrase are correct.

Example:

evenUp("HeLlO") --> 1.0 // All 5 correct
evenUp("hi") --> 0.5 // 1 out of 2 correct
evenUp("HELlO") -->0.8 // 4 out of 5 correct
Reset Code

Slides and Notes

No slides available for this video

About

Java Practice (main)
Java Version 1.8.0_222