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

 

apcsaPrimitivesLuckySeven


Given a double which may be large both before or after the decimal point, return true if the value contains a 7 anywhere when it is written in base 10 (the default when printing a double value). Precondition: input will not be a special double value.


HINT: think of this more as a String problem.

apcsaPrimitivesLuckySeven(7.0) → true
apcsaPrimitivesLuckySeven(5.33523) → false
apcsaPrimitivesLuckySeven(-13636.0230567) → true

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

public boolean apcsaPrimitivesLuckySeven(double num) { }

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

Copyright Nick Parlante 2017 - privacy