Answer:
def PhoneNumberTextBox (integer):
print(len(integer))
PhoneNumberTextBox ("414-555-5555")
Run the code and the length of the phone number text box will be 12.
Explanation:
The value for the length of the phone text box can be known using a programming language to decipher the length. For example let write a function to allow the computer get the length of the number with python.
def PhoneNumberTextBox (integer):
We write the function to accept an argument known as integer.
print(len(integer))
We print the length of the integer . The len function compute the length of the argument written . The print function displays the length of the argument.
PhoneNumberTextBox ("414-555-5555")
We call the function and insert the integer in form of a string to get the length. when we run the function the length of the number is 12.
Answer:
import java.util.Scanner;
public class CocaColaVendingTest {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter the total number of calls received");
int callsReceived = input.nextInt();
System.out.println("Enter the total number of operators");
int operatorsOnCall = input.nextInt();
int callsPerOperator = callsReceived/operatorsOnCall;
System.out.println("The number of calls per operator is "+callsPerOperator);
}
}
Explanation:
A complete Java code is given above. The user is prompted to enter the values for the number of calls received and the number of operators. These are stored in the respective variables.
Using an Integer division, the number of calls per operator is obtained by: callsPerOperator = callsReceived/operatorsOnCall;