1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
antoniya [11.8K]
3 years ago
5

PLEASE HURRY!!! Look at the image below

Computers and Technology
1 answer:
Darina [25.2K]3 years ago
6 0

Answer:

The answer to this question is given below in the explanation section.

Explanation:

In this question, the given code is :

<em>def divide(numA,numB):</em>

<em>   quotient = numA/numB</em>

<em>   return quotient</em>

<em>#the main part of your program that calls the function</em>

<em>numC=40</em>

<em>numD=5</em>

<em>answer=divide(numC,numD)</em>

<em>print("Quotient", answer)</em>

<em>print (numA)         </em>

The variable numA scope is local to divide function.

Because you can not access this variable outside of the divide function. All other variables such as numB and quotient also local variables of the divide function. These variables can not be accessible outside the divide function.

You might be interested in
what is cicada 3301? i will give brainliest if you give me a correct answer (not copy and pasted) and somewhat well detailed, i
KiRa [710]

Answer:

From what I know it's a seris of web puzzles dating a few years back. The creators were looking for really smart people to work in their organizations as coders

8 0
3 years ago
What is a header row?
777dan777 [17]

Answer:

b. the top row of a table that shows titles for the cells below

Explanation:

A header row is the first row of a given table that shows titles of the cells below it. In many cases, the header row has different styles from the other rows in the table. A header row can be found in, among others, both Microsoft's Excel and Word applications.

In the attached figure, the first row with a darker shade of background color is the header row for the table.

8 0
3 years ago
Is it true that if the user log out the computer will turn off automatically​
sergiy2304 [10]
Yes that is a true statement
8 0
3 years ago
Read 2 more answers
Which of the following is NOT areserved word in Java?intpublicstaticnum
Rama09 [41]

Answer:

num

Explanation:

In java reserved words are also known as keywords, keywords are reserve words for a language that can't be used as an identifier(name of a class, name of a variable, name of an array etc.) int, public static, are reserve words.

In given question num is not a reserved word.

6 0
3 years ago
The following program uses a variable workHoursPerWeek rather than directly using 40 in the salary calculation expression.
Serjik [45]

Answer:

<u> Initial program output (from original program)</u>

Annual salary is: 40000

Monthly salary is: 3333

<u>Program output after workHoursPerWeek = 35</u>

Annual salary is: 35000

Monthly salary is: 2916

<u>Revised program (using variable workWeeksPerYear)</u>

  1.    public static void main(String[] args) {
  2.        int hourlyWage = 20;
  3.        int workHoursPerWeek = 35;
  4.        int workWeeksPerYear = 52;
  5.        int annualSalary = 0;
  6.        annualSalary = hourlyWage * workHoursPerWeek * workWeeksPerYear;
  7.        System.out.print("Annual salary is: ");
  8.        System.out.println(annualSalary);
  9.        System.out.print("Monthly salary is: ");
  10.        System.out.println((hourlyWage * workHoursPerWeek * workWeeksPerYear) / 12);
  11.        return;
  12.    }

Program output:

Annual salary is: 36400

Monthly salary is: 3033

<u>Revised Program after introducing monthly salary</u>

  1.    public static void main(String[] args) {
  2.        int hourlyWage = 20;
  3.        int workHoursPerWeek = 35;
  4.        int workWeeksPerYear = 52;
  5.        int annualSalary = 0;
  6.        int monthlySalary = 0;
  7.        
  8.        annualSalary = hourlyWage * workHoursPerWeek * workWeeksPerYear;
  9.        monthlySalary = hourlyWage * workHoursPerWeek * workWeeksPerYear;
  10.        
  11.        System.out.print("Annual salary is: ");
  12.        System.out.println(annualSalary);
  13.        System.out.print("Monthly salary is: ");
  14.        System.out.println((monthlySalary) / 12);
  15.        return;
  16.    }

Explanation:

One reason to use variable to replace the magic number is to improve the readability of the program. If we compared the revised version of the program with the original program, we will find that the variable enable our code easier to understand.

Besides, if we wish to change the value (e.g. working hours per year or per month), we just need to adjust the value assigned on the variables. The variables provide a single access point to get or change the value.

7 0
3 years ago
Other questions:
  • Define the method object inc_num_kids() for PersonInfo. inc_num_kids increments the member data num_kids.Sample output for the g
    11·1 answer
  • How do i set up a RAID 1 array?​
    6·1 answer
  • You notice that it’s very easy to confuse medications at the community health center where you’re working. They are lined up on
    10·1 answer
  • A jeweler designing a pin has decided to use five stones chosen from diamonds, rubies, and emeralds. In how many ways can the st
    9·1 answer
  • .doc What is the difference between a skilled hacker and an unskilled hacker, other than skill levels? How does the protection a
    5·1 answer
  • Which function works best when you need to remove an element at a pacific index and a list
    15·1 answer
  • The large capacity, high-definition optical discs designed to store hi-def video and video games are _______. Group of answer ch
    13·1 answer
  • What game is the best for racing and modifying cars
    10·1 answer
  • What is the definition of shape
    14·2 answers
  • When i add someone to canvas course, do they get an invitation?.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!