logo

Crowdly

Browser

Add to Chrome

Questions Bank (1491654 total)

Consider: 

def mean(values): 

    """Return the arithmetic mean of the supplied values.""" 

    total = 0 

    for value in values: 

        total = total + value 

    return total / len(values) 

 

result = mean([2, 4, 9]) 

print(result) 

 

State the exact printed output. In your explanation, identify: 

  • the value supplied to values;
  • the final value of total;
  • what len(values) returns.

[2 marks] 

 

View this question

A student wants to calculate: 

result = mean([2, 4, 9]) + 1 

They suggest replacing the function’s final line with: 

print(total / len(values)) 

Explain why printing the mean is not a suitable replacement for returning it in this use of the function. [2 marks] 

View this question

After a successful call to the original function, a student adds: 

print(total) 

outside the function. 

They argue: “The function has run, so total now exists and can be printed here.” 

Explain why this reasoning is incorrect, and identify which variable outside the function holds the returned mean. [2 marks]

View this question

Suppose the call is changed to: 

result = mean([]) 

Explain why the function cannot complete successfully as written. Describe a suitable way for the function to handle this case, and justify your choice. You do not need to write code. [2 marks] 

View this question
The starting point for understanding consumer behavior is the ________ model in which marketing and environmental stimuli enter the consumer's consciousness, and a set of psychological processes combine with certain consumer characteristics to result in decision processes and purchase decisions.
✅
❌
❌
❌
❌
View this question

The buyer-supplier relationship characterized by simple, routine

exchanges with moderate levels of cooperation and information exchange is

called _____.

✅
❌
❌
❌
❌
View this question

One variant of systems selling is _____ where a single supplier provides

the buyer with his or her entire requirement of MRO (maintenance, repair,

operating) supplies.

❌
❌
✅
❌
❌
View this question
Business markets have several characteristics that contrast sharply with those of consumer markets. Which of the following characteristics describes a scenario where suppliers are expected to customize their offerings to individual business customer needs?
✅
❌
❌
❌
❌
View this question

The last stage in the

industrial buying process is supplier selection.

0%
100%
View this question

The demand for business goods and services tends to be more volatile

than the demand for consumer goods and services.

100%
0%
View this question