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
nignag [31]
2 years ago
10

Write a function called prod_all that takes any number of arguments and returns their sum. Test the function by using these two

tuples (separately) as arguments: (1, 2, 3, 4) & (4,6,8): prod_all(1, 2, 3, 4) # The answer should be 24 prod_all(4, 6, 8) # The answer should be 192 [10]: def prod_all(*args): tupl = (args) total *= n # total = total *n
Computers and Technology
1 answer:
sattari [20]2 years ago
3 0

Answer:

from functools import reduce

def prod_all(*args):

   prod = reduce(lambda x,y: x *y, args)

   return prod

result = prod_all(4,6,8)

print(result)

Explanation:

The use of the "*args" passes a tuple of variable length to a python defined function. The function above takes any number of arguments and returns the product using the python reduce module and the lambda function.

You might be interested in
You've just installed a new video card in a user's Windows workstation. When the system is powered on the screen is blank. You
valentinak56 [21]

After having verified that the video cable is installed correctly we should check to see that the computer's RAM is correctly fastened to the motherboard and functional.

The question states that the video card being installed is new, therefore we can comfortably assume that the card itself is not the issue. Other computer components that can cause a blank screen immediately upon powering on the workstation are:

  • RAM
  • Hard drive
  • Bad video driver.
  • Monitor input is faulty

however, assuming the installation was performed correctly, it is not likely to be caused by a bad video driver and a faulty monitor input is very improbable given that there are very few ways this can break to begin with.

A bad or missing hard drive may cause this kind of issue because the workstation will not have a windows file to boot. In most cases, this will not cause a completely blank screen without first allowing access to the BIOS.

After having verified that the video cable is installed correctly, the very next thing you should check is if the RAM is installed correctly. This is because the issue explained is exactly what will happen if a workstation attempts to boot without RAM, and also because it is the easiest fix among the possible causes and any troubleshooting should always be performed in order from the easiest fix to the most difficult.

To learn more visit:

brainly.com/question/2160588?referrer=searchResults

8 0
2 years ago
What can you achieve by selecting Insert in the Table menu?
BARSIC [14]
You can add row, table, columns or cells
4 0
3 years ago
Read 2 more answers
Corona and app inventor can be used to develop ________.
Sidana [21]
<span>Corona and app inventor can be used to develop apps for smartphones. Corona can be used to build both games and apps from major platforms like iOS, Android, Kindle, Apple TV, Android TV, macOS, and Windows. App Inventor was originally provided by Google and is now maintained by MIT.</span>
3 0
3 years ago
Each week, the Pickering Trucking Company randomly selects one of its 30 employees to take a drug test. Write an application tha
Sati [7]

Answer:

Following are the program to this question:

import java.util.*; //import package

public class Main //defining class

{

 public static void main(String[] args) //defining main method

 {

   int testedEmployee; //defining integer variable

   for(int i = 1;i<=52;i++) //defining loop that counts from 1 to 52  

   {

     testedEmployee = 1 + (int) (Math.random() * 30); //using random method that calculate and hold value

     System.out.print(testedEmployee+"\t"); //print value

     if(i%4 == 0)//defining codition thats checks value is divisiable by 4  

     {

       System.out.println(); //print space

     }

   }

 }

}

Output:

please find the attachment.

Explanation:

In the given java program, a class Main is declared, inside the class, the main method is declared, in which an integer variable "testedEmployee", is declared, in the next line, the loop is declared, that can be described as follows:

  • Inside the loop, a variable "i" is declared, which starts from 1 and stop when its value is 52, inside the loop a random method is used, that calculates the random number and prints its value.
  • In the next step, a condition is defined, that check value is divisible 4 if this condition is true, it will print a single space.

3 0
3 years ago
Place the steps in correct order for activating the resend option in Outlook. Choose Resend This Message Click Actions Open the
Dominik [7]

Answer:

1. Open the sent messages 2. Make additions/edits 3. Click actions                    4. Choose resend this Message  

Explanation:

I got It wrong on Edge, so it showed me the right answer

8 0
2 years ago
Other questions:
  • Assign decoded_tweet with user_tweet, replacing any occurrence of 'TTYL' with 'talk to you later'. Sample output with input: 'Go
    14·2 answers
  • What is the operating system?
    9·1 answer
  • Using the _____ model brings sellers and buyers together on the web and collects commissions on transactions between these parti
    5·1 answer
  • A potential threat to administrators’ ability to manage the correctional system is
    12·1 answer
  • For an machine using 2-dimensional even parity for error detection/correction, and the following received bytes, where is the er
    9·1 answer
  • What is a relationship between a object and a class?
    7·1 answer
  • PLEASE HELP!! WILL MARK BRAINLIEST!!
    15·1 answer
  • Data from RAM may be placed where to free up space? Log file Swap file Word file Print spool file
    10·1 answer
  • Do you think Apple will eventually meet their goal of becoming a replacement for a physical wallet
    7·1 answer
  • How to scan a screenshot on Brainly?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!