Answer:
Option 2, letter.islower() is correct
Explanation:
letter.islower() returns true when the string "letter" is lowercase.
A tsunami/tidal wave is a huge wave caused by an earthquake.
Answer:
A developer wants to take existing code written by another person and add some features specific to their needs.
Explanation:
pls Mark as Brain list
Answer:
- public class Square {
- public static boolean isPerfectSquare(int n){
- int sqrt_n = (int) Math.sqrt(n);
- if(sqrt_n * sqrt_n == n ){
- return true;
- }else{
- return false;
- }
- }
- }
Explanation:
Firstly, use sqrt method from Math package to calculate the square root of input n (Line 3). Cast the result to integer and assign it to sqrt_n variable.
Next, square the sqrt_n and check if it is equal to input n (Line 4). If so, return true, if not, return false (Line 4-8).