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
Alenkinab [10]
3 years ago
13

Write a function called min that returns the minimum of the two numbers passed in as parameters.

Computers and Technology
1 answer:
Kitty [74]3 years ago
4 0

def min(x,y):

   smallest = x

   if y < smallest:

       smallest = y

   return smallest

x = min(2,1)

print("The min is "+str(x))

Although I wouldn't recommend using the name min for a function because min is the name of an existing function. Best of luck.

You might be interested in
What is e-governence?What are the advantage of it.​
kondaur [170]

Answer:

The advantages of e-government include an improved flow of information from citizen to government, government to citizen, and within government itself. Additionally, e-government helps modernize administration procedures, improving economies and promoting transparency in the process.

E-government is the use of technological communications devices, such as computers and the Internet, to provide public services to citizens and other persons in a country or region.

5 0
2 years ago
Tools used to build a bridge<br>​
Sati [7]

Aerial Lifts,

Vertical Masts and Hydro Platforms,

Telehandlers,

Excavators,

Skid Loaders,

Backhoes,

Cranes,

Air Compressors.

If It was helpful, can you make me brainliest please?

6 0
2 years ago
What are the correct steps to find the system specifications such as the amount of ram or system type for windows 7 machine?
Nutka1998 [239]

First, click the Start button. Then, select Control Panel. Next, go to System and Security. To find out the amount of RAM and system type of your device, select System. The information you need will be displayed along with the type of processor, computer name, domain, and windows activation details.

5 0
3 years ago
Rob is planning his housewarming party. He wants to design an invitation and personalize it for each invitee. He needs to create
lara31 [8.8K]

Answer:

1: Word Processor

2: Graphics Software

3: Mail Merge

Explanation:

Given

1. Create a list of invitees

2. Design an invitation card

3. Personalize the card

Creating a list of invitees is a task that requires basic activities such as typing, using of numbers and bullets; these activities can be achieved using word processing software programs such as Microsoft Word, WordPerfect, amongst others.

<em>So task 1 requires a word processor</em>

An invitation card is a piece of graphics that can be perfectly handled by graphics software programs such as CorelDraw, Adobe Photoshop, etc.

<em>So task 1 requires a graphics software</em>

Task 3 can be achieved using mail merge and this is because mail merge can be used either to print or to mail recipients. While mailing the recipients, one can easily personalize each letter (or in this case, an invitation card) to suit the recipient it is being directed to.

5 0
2 years ago
Create a dictionary that will hold AT LEAST 3 categories for food with at least 3 foods for each category. E.g. Fruits --&gt; Ap
RSB [31]

Answer:

  1. food_category = {
  2.    "Fruits": ["Apple", "Strawberries", "Orange"],
  3.    "Vegetables": ["Carrots", "Peas", "Onions"],
  4.    "Meats": ["Chicken", "Beef", "Mutton"]
  5. }
  6. for cat in food_category:
  7.    output = cat + ": "
  8.    for food in food_category[cat]:
  9.        output += food + ", "
  10.    print(output)
  11. answer = input("Do you want to add category or food (Y - Yes  N - No): ")
  12. while(answer == "Y"):
  13.    choice = input("New Category (N) or New Food (nf): ")
  14.    
  15.    if(choice == "N"):
  16.        new_cat = input("Enter new category name: ")
  17.        if(new_cat not in food_category):
  18.            food_category[new_cat] = ""
  19.    elif(choice == "nf"):
  20.        cat = input("Enter category: ")
  21.        new_food = input("Enter new food name: ")  
  22.        food_category[cat].append(new_food)
  23.    
  24.    answer = input("Do you want to add new category or food (Y - Yes N - No): ")
  25. print("All food categories: ")
  26. for cat in food_category:
  27.    print(cat)
  28. selected_cat = input("Select a category to view the food list: ")
  29. output = ""
  30. for food in food_category[selected_cat]:
  31.    output += food + ", "
  32. print(output)

Explanation:

The solution code is written in Python 3.

Firstly, create a food category dictionary data structure (Line 1 -5). Next, display all the food category and the food in each category (Line 7 - 11)

Next prompt user to feedback if they wish to add new category or new food (Line 13).

While the answer is yes prompt user to enter their choice, either category or food and use if else if statements to handle the choice made by the user. If the choice is new category, prompt user to enter new category name and check if the new category is already exist in the dictionary. If not, add that category to dictionary (Line 18 - 21).

If the choice is food, nf, prompt user to input food category and enter the new food name and add it to the food_category list (Line 22 - 25).

After that prompt user to enter if they wish to continue to add new data (Line 27).

After collecting all info from user, write a for loop to display all the categories (Line 29 - 31).

At last, prompt user to select a category and display all the food of the selected category (Line 33 - 37).

8 0
2 years ago
Other questions:
  • Why would you set up a workbook to be shared if you are the only one using the workbook?
    7·1 answer
  • What are other ways you could use the shake or compass code blocks in physical computing projects?
    14·1 answer
  • Imagine that you wanted to write a program that asks the user to enter in 5 grade values. The user may or may not enter valid gr
    10·1 answer
  • An organization using Robotic Process Automation (RPA) wishes to verify the quality and results of their automated processes to
    6·1 answer
  • Why do attackers tend to target public or private Wi-fi networks?
    10·1 answer
  • Why can’t I message people? It doesn’t let me, please help.
    12·2 answers
  • In the second example with modulus math, why can't Eve find the solution?
    10·1 answer
  • Check all of the file types that a Slides presentation can be downloaded as.
    5·2 answers
  • What is the minimum number of bits you would need to represent a number on a 0 to 10 scale
    15·1 answer
  • How is technology moving the business world forward?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!