Answer:
The definition of a class Telephone is given as
public class Telephone // class telephone
{
String number; // variable number of type string
static int quantity = 250;
// variable quantity of type int
static double total = 1565.92; // variable total of type double
}
Explanation:
Following is the description of Statement
- Create a class "Telephone" by using the keyword class.In that class we declared data member .
- We declared a variable "number" of type "string" which has no constructor.
- We declared a variable "quantity" of type "int" which is a static type variable. The static type variable retains the value during the program execution.
- We declared a variable "total" of type "double" which is a static type variable. The static type variable retain the value during the program execution .
I believe its <span>c-set up a study space, preview your materials, create a routine</span>
Answer:
Here is the Python program which has a function sum_scores:
def sum_scores(score1, score2, score3, score4):
sum = score1 + score2 + score3 + score4
print(sum)
sum_scores(14,7,3,0)
Explanation:
- Method sum_scores takes four arguments, score1, score2, score3, score4.
- The sum variable adds these four scores and stores the value of their addition.
- Lastly print statement is used to print the value stored in sum variable which is the value obtained by adding the four scores.
- Last statement calls the sum_scores method and passes four values to it which are 14,7,3,0
- The output of the above program is:
- 24
- If you want to use return statement instead of print statement you can replace print(sum) with return sum. But in order to display the sum of the scores you can replace sum_scores(14,7,3,0) with print(sum_scores(14,7,3,0))
- The program along with the output is attached as a screenshot.
Answer:

Explanation:
Given
Power at point A = 100W
Power at point B = 90W
Required
Determine the attenuation in decibels
Attenuation is calculated using the following formula

Where
t and
t


Substitute these values in the given formula




<em>(Approximated)</em>
Answer:
The program in Python is as follows:
n = int(input("Enter an integer: "))
if n < 0:
n = 0
print("Sequence:",end=" ")
for i in range(n,-1,-1):
if i%2 == 0:
print(i,end = " ")
Explanation:
This gets input for n
n = int(input("Enter an integer: "))
This sets n to 0 if n is negative
<em>if n < 0:</em>
<em> n = 0</em>
This prints the string "Sequence"
print("Sequence:",end=" ")
This iterates from n to 0
for i in range(n,-1,-1):
This check if current iteration value is even
if i%2 == 0:
If yes, the number is printed
print(i,end = " ")