Identify and write the errors given in the flowchart (with steps and flowchart) : Start ↓ Input A,B ↓ Average = (A + B + C) / 3 ↓ Print Average ↓ Stop

Answers

Answer 1

Answer:

i will send you the answers in the next 10minute


Related Questions

Implement the function:

string get_ap_terms(int a, int d, size_t n);

which returns a string containing the first n terms of the arithmetic progression (AP) as a sequence of comma-separated values.

Answers

Answer:

This is written in C++

Check comments for explanations

Program starts here

#include<iostream>

#include<string>

using namespace std;

//The function get_ap_terms begins here

string get_ap_terms(int a, int d, int size_tn)

{  

// This line initializes the expected string to empty string

string result = "";

//The for iteration loops through the number of terms the function is expected to return

for(int i = 1; i<= size_tn;i++)

{

//This line checks if the loop is less than the number of  terms    

if(i < size_tn)

  {

//This string gets the current term of the progression

   result+=to_string(a)+ ", ";

//This line calculates the next term

   a+=d;  

  }

  else

  {

//This line calculates the last term

   result+=to_string(a);

  }

}

//This line returns the string containing the first n terms of the arithmetic progression

return result;

}

//The main function starts here

int main()

{

//This line declares the first term (a), the common difference (d) and the number of terms (size_tn)

int a,d,size_tn;

//This line prompts the user for the first term

cout<<"First Term: ";

//This line gets the first term

cin>>a;

//This line prompts the user for the common difference

cout<<"Common Difference: ";

//This line gets the common difference

cin>>d;

//This line prompts the user for number of terms

cout<<"Number of Terms: ";

//This line gets the number of terms

cin>>size_tn;

//This line calls the function to print the string containing the first n terms

cout<<get_ap_terms(a, d, size_tn);

return 0;

}

//Program ends here

The is_positive function should return True if the number received is positive, otherwise it returns None. Can you fill in the gaps to make that happen?

Answers

Question:

The is_positive function should return True if the number received is positive, otherwise it returns None. Can you fill in the gaps to make that happen?

def is_positive(number):

       if  _____ :

           return _____

Answer:

def is_positive(number):

   if (number > 0):

       return True

  else:

       return "None"

---------------------------------------------------------------------------------

Code Test and Sample Output:

print(is_positive(6))

>> True

print(is_positive(-7))

>> None

----------------------------------------------------------------------------------

Explanation:

The code above has been written in Python.

Now, let's explain each of the lines of the code;

Line 1: defines a function called is_positive which takes in a parameter number. i.e

def is_positive(number):

Line 2: checks if the number, supplied as parameter to the function, is positive. A number is positive if it is greater than zero. i.e

if (number > 0):

Line 3: returns a boolean value True if the number is positive. i.e

return True

Line 4: defines the beginning of the else block that is executed if the number is not positive. i.e

else:

Line 5: returns a string value "None" if the number is not positive. i.e

return "None"

All of these put together gives;

===============================

def is_positive(number):

   if (number > 0):

       return True

   else:

       return "None"

================================

An example test of the code has also been given where the function was been called with an argument value of 6 and -7. The results were True and None respectively. i.e

print(is_positive(6))   = True

print(is_positive(-7))  = None

Following are the python program to check input number is positive or negative:

Program:

def is_positive(n):#defining the method is_positive that takes one variable in parameter

   if (n > 0):#defining if block that check input number is positive

       return True#return boolean value that is True

   else:#else block

      return "None"#return string value

n=int(input("Enter number: "))#defining n variable that input a number

print(is_positive(n))#using print method that calls and prints method return value

Output:

please find the attached file.

Program Explanation:

Defining the method "is_positive" that takes one variable "n" in the parameter.Inside the method, if conditional block is defined that checks the input number is positive, if it's true, it will return a boolean value that is "True". Otherwise, it will go to the else block, where it will return a string value that is "None".Outside the method, the "n" variable is declared to be an input number.After the input value, a print method is used that calls the "is_positive" method and prints its return value.

Find out more about the method here:

brainly.com/question/5082157

DOLLAR GENERAL
x
Knowledge Check
Non-employees are allowed in the store before the store opens and after
closing time.
True
False
SUBMIT​

Answers

Answer:

False

Explanation:

Unless authorized by a manager. Only staff members are allowed in the store before and after normal store hours.

Answer:

The correct answer is

False

If you are not an employee you are not allowed in stores before opening hours or after closing time. The only times non-staff are allowed in the store is for purchasing of products during hours of operation.h

Hope this helps!

Other Questions
What effect did the Royal Navys strategy of impressment have on the War of 1812? It increased the size of the Royal Navy. It promoted a system for naval battles in the Atlantic Ocean. It eliminated the need to draft people into the Continental Army. It decreased the size of the French Navy. Five submarines sink on the same day, and all five go down at the same spot where a sixth had previously sunk. How might they all lie at rest so that each submarine touches the other five? To simplify, arrange six wooden matches so that each match touches every other match. No bending or breaking allowed. Please answer this correctly heleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep The points (0, 1) and (4, 5) lie on the straight line L.Find an equation of the line which is parallel to L and passes through the point (2, 0). Is technology during the 20th century good or evil? Why or why not.... Explain and give an example (1 paragraph) On January 1, 2021, an investor paid $296,000 for bonds with a face amount of $316,000. The contract rate of interest is 12% while the current market rate of interest is 15%. Using the effective interest method, how much interest income is recognized by the investor in 2022 (assume annual interest payments and amortization) If the total revenue variance is favorable and the revenue price variance is unfavorable, then the revenue volume variance must a.exceed the revenue price variance and be favorable b.be less than the revenue price variance and be favorable c.be less than the revenue price variance and be unfavorable d.be equal to the revenue price variance and be favorable How does a reader find an author's purpose?I. by examining the author's backgroundII. by examining the historical and cultural contextIII. by examining the details in the textO I onlyO I, II, and IIIOll and III onlyI and II only The graph of f(x) = 2x + 1 is shown below. Explain how to find the average rate of change between x = 2 and x = 5. (10 points) Graph of 2 to the power of x plus 1 Fill in the blank with the future tense of the verb in parentheses. Mi libro no _____________ en la mochila. (caber) (1 point) If the current flowing through a circuit of constant resistance is doubled, the power dissipated by that circuit will Group of answer choices simplify 2(4+8)2(8+8) The mathematics of combining quantum theory with wave motion of atomic particles is known as _____. What is the solution to the equation? StartFraction r Over 7.1 EndFraction = 4.2 r = What is the best estimate for the value of the expression?348163149.-3-21O7 Youre trying to save to buy a new $245,000 Ferrari. You have $50,000 today that can be invested at your bank. The bank pays 4.3 percent annual interest on its accounts. How long will it be before you have enough to buy the car? tu siempre llevas zapatos negros. esos de ah son ________ zapatos verdad?A. tusB. susC. tuD. su An x-method chart shows the product a c at the top of x and b at the bottom of x. Below the chart is the expression a x squared + b x + c Consider the trinomial x2 + 10x + 16. Which pair of numbers has a product of ac and a sum of b? What is the factored form of the trinomial? What values are revealed by Native American stories about the origin of the earth and its creatures?