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
WINSTONCH [101]
3 years ago
14

You wrote a program to find the factorial of a number. In mathematics, the factorial operation is used for positive integers and

zero.
What does the function return if the user enters a negative three?

def factorial(number):
product = 1
while number > 0:
product = product * number
number = number - 1
return product

strNum = input("Enter a positive integer: ")
num = int(strNum)
print(factorial(num))


-6

1

There is no output due to a runtime error.

-3
Computers and Technology
2 answers:
Alona [7]3 years ago
7 0

Answer: 1

Explanation:

got it on Edge.

Nata [24]3 years ago
3 0

Answer:

The correct answer is 1

Explanation:

Correct on edge 2020

You might be interested in
A certain computer has a 4meg address space. how many bits wide is this computer's address bus?
PIT_PIT [208]
22 bits






-----------------------------------
4 0
3 years ago
Given the following output from /etc/fstab, which filesystems will be automatically checked on boot by the fsck command? [BEGIN
leva [86]

Answer:

Details below

Explanation:

From the following output we will get: /, /dev/pts, and /dev/shm while fsck is running automatically at boot for all filesystems

6 0
3 years ago
You are a network administrator. Your company recently approved of employees working from home one day a week and the use of emp
Orlov [11]

Answer:

To establish the BYOD policy is the correct answer to the following question.

Explanation:

<u>Implementation of the BYOD(Bring Your Own Device)</u>:

  1. Firstly, set you objectives and establish it.
  2. Then, you have to decide and tell your employees that what types of devices are only allowed in your organization.
  3. Then, establish your security policies related to the BYOD policy.
  4. Then, give good training by you or by the IT professionals to your employees.
  5. Finally, if the employee are leaving your organization then, you have to remove those employees from the BYOD policy by which they cannot access your company's informations.
8 0
3 years ago
What is one benefit of using electronic flash cards?
velikii [3]

Answer:

They can be searched using keywords. they may have a different alarm settings. they provide a personal organizer.

Explanation:

Hope this helped Mark BRAINLIEST!!!

4 0
3 years ago
Read 2 more answers
Write a program that declares a two-dimensional array named myFancyArray of the type double. Initialize the array to the followi
kirill115 [55]

Answer:

This solution is provided in C++

#include <iostream>

using namespace std;

double sumFancyArray(double myarr[][6]){

   double sum = 0.0;

   for(int i = 0;i<2;i++)    {

       for(int j = 0;j<6;j++){

       sum+=myarr[i][j];    

       }}    

   return sum;

}

void printFancyArray(double myarr[][6]){

   for(int i = 0;i<2;i++)    {

       for(int j = 0;j<6;j++){

       cout<<myarr[i][j]<<" ";    

       }

   }

}

int main(){

   double myFancyArray[2][6] = {23, 14.12, 17,85.99, 6.06, 13, 1100, 0, 36.36, 90.09, 3.145, 5.4};

   cout<<sumFancyArray(myFancyArray)<<endl;

   printFancyArray(myFancyArray);

   

   return 0;

}

Explanation:

This function returns the sum of the array elements

double sumFancyArray(double myarr[][6]){

This initializes sum to 0

   double sum = 0.0;

This iterates through the row of the array

   for(int i = 0;i<2;i++)    {

This iterates through the column

       for(int j = 0;j<6;j++){

This adds each element

       sum+=myarr[i][j];    

       }}    

This returns the sum

   return sum;

}

This method prints array elements

void printFancyArray(double myarr[][6]){

This iterates through the row of the array

   for(int i = 0;i<2;i++)    {

This iterates through the column

       for(int j = 0;j<6;j++){

This prints each array element

       cout<<myarr[i][j]<<" ";    

       }

   }

}

The main starts here

int main(){

This declares and initializes the array

   double myFancyArray[2][6] = {23, 14.12, 17,85.99, 6.06, 13, 1100, 0, 36.36, 90.09, 3.145, 5.4};

This calls the function  that returns the sum

 cout<<sumFancyArray(myFancyArray)<<endl;

This calls the function that prints the array elements

   printFancyArray(myFancyArray);

   

   return 0;

}

Download cpp
7 0
3 years ago
Other questions:
  • An investigator obtains consent and HIPAA authorization from subjects to review their medical records and HIV status. He plans t
    8·1 answer
  • You are given two int variables j and k, an int array zipcodeList that has been declared and initialized, an int variable nZips
    10·2 answers
  • Suppose that we have a set of activities to schedule among a large number of lecture halls, where any activity can take place in
    8·1 answer
  • A user calls you and says that when they try to connect to the internal website, they are prompted for authentication. The user
    14·1 answer
  • A(n) __________ item is a hardware or software item that is to be modified and revised throughout its life cycle
    10·1 answer
  • Adjust list by normalizing When analyzing data sets, such as data for human heights or for human weights, a common step is to ad
    7·1 answer
  • What will be the results of the following code? final int Array_Size = 5;An error will occur when the program runs. There will b
    10·1 answer
  • create a function that draws a certain number of spaces, followed by a certain number of stars, followed by a newline.
    6·1 answer
  • I don't get the width and height part (PLEASE HELP WILL GIVE BRAINLIEST ANSWER)
    12·1 answer
  • A local pizza shop is selling a large pizza for $9.99. Given the number of pizzas to order as input, output the subtotal for the
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!