Answer:
public class Digits
{
public static boolean allDigitsOdd(int num)
{
boolean flag=true;
int rem;
while(num>0)
{
rem=num%10;
num=num/10;
if(rem%2==0) // if a even digit found immediately breaks out of loop
{
flag=false;
break;
}
}
return flag; //returns result
}
public static void main(String args[])
{
System.out.println(allDigitsOdd(1375)); //returns true as all are odd digits
}
}
OUTPUT :
true
Explanation:
Above program has 2 static methods inside a class Digits. Logic behind above function is that a number is divided by 10 until it is less than 0. Each time its remainder by 0 is checked if even immediately breaks out of the loop.
Answer:
In Python:
def get_letter_grade(points):
if points>=900:
grade ="A"
elif points>=800 and points < 900:
grade ="B"
elif points>=700 and points < 800:
grade ="C"
elif points>=600 and points < 700:
grade ="D"
else:
grade = "F"
return grade
Explanation:
This defines the function
def get_letter_grade(points):
The following if-else if conditions check the score to determine the appropriate grade
<em> if points>=900:</em>
<em> grade ="A"</em>
<em> elif points>=800 and points < 900:</em>
<em> grade ="B"</em>
<em> elif points>=700 and points < 800:</em>
<em> grade ="C"</em>
<em> elif points>=600 and points < 700:</em>
<em> grade ="D"</em>
<em> else:</em>
<em> grade = "F"</em>
This returns the grade
return grade
Answer: Tar.
Explanation:
A chemical substance made when tobacco is burned. Tar contains most of the cancer-causing and other harmful chemicals found in tobacco smoke. When tobacco smoke is inhaled, the tar can form a sticky layer on the inside of the lungs.
Answer:
The answer to this question is DVD and DVD-RW
Explanation:
It looks niceee
Also can you mark me brainlyest for extra points