He could use bold or bigger text just a suggestion.
f = int(input("Enter a number: "))
if(f%7==0):
print("It's divisible by 7.")
else:
if(f<7):
print("7")
else:
print(str(f-(f%7))+", "+str(f+(7-(f%7))))
Answer:
import java.util.Scanner;
public class num8 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter month's budget");
double monthBudget = in.nextDouble();
double totalExpenses = 0.0;
double n;
do{
System.out.println("Enter expenses Enter zero to stop");
n = in.nextDouble();
totalExpenses += n;
}while(n>0);
System.out.println("Total expenses is "+totalExpenses);
System.out.println("The amount over your budget is "+ Math.abs(monthBudget-totalExpenses));
}
}
Explanation:
- Using Java programming language
- Prompt user for month's budget
- Use Scanner class to receive and store the amount entered in a variable
- Use a do while loop to continuously request user to enter amount of expenses
- Use a variable totalExpenses to add up all the expenses inside the do while loop
- Terminate the loop when user enters 0 as amount.
- Subtract totalExpenses from monthBudget and display the difference as the amount over the budget
<span>If a user name can have seven letters (with no distinction between upper and lower case), and if a letter can be repeated, then the maximum number of names is 26x26x26x26x26x26x26, or 8,031,810,176. That is, slightly more than eight billion names are possible.</span>
I think it's right.
<span>Text, numbers, graphics, or sound represented by discrete digits, such as 1s and 0s.</span>