answer.
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
Paha777 [63]
1 year ago
12

Write a function named max that accepts two integer values as arguments and returns the value that is the greater of the two. Fo

r example, if 7 and 12 are passed as arguments to the function, the function should return 12. Use the function in a program that prompts the user to enter two integer values. The program should display the value that is the greater of the two
Computers and Technology
1 answer:
RoseWind [281]1 year ago
6 0

Answer:

The solution code is written in Python

  1. def max(a, b):
  2.    if(a > b):
  3.        return a  
  4.    else:
  5.        return b
  6. num1 = int(input("Please input the first number: "))
  7. num2 = int(input("Please input the second number: "))
  8. print(max(num1, num2))

Explanation:

Firstly create a function max that accepts two input, a and b, as required by question (Line 1). In the function, create if statement to check if a greater than b return a and vice versa (Line 2 -5).

In the main program (Line 7 - 10), prompt user to input two numbers (Line 7 - 8). At last call the function by passing num1 and num2 as arguments and print the result (Line 10).

You might be interested in
Match the vocabulary word to the accurate definition. A software program that enables you to search for, interact with, and retr
SashulF [63]

Answer:

A software program that enables you to search for, interact with, and retrieve information resources: Search Engine

A method by which data is transferred from one computer to another through the Internet Data Transfer

Coordinates actions between the user interface and the rendering engine: Operating Systems

Handles requests for information resources from networked servers: SERVER

Includes web pages, images, videos, music files, and other forms of content WEBSITE

Enables a browser to save browsing information Advanced Settings  

Includes an address bar, Back and Forward buttons, bookmarking menu, and other useful features Web browser

Displays content on the screen. Monitor

Explanation:

If you enable the browser to remember the browser experience, then you certainly need to go inside the advanced settings and from there you can check remember last 7 days and other options. Content is displayed on Monitor, And it is the website that shows images, video, text etc. The information resources are being controlled through the server, and Data transfer is the transfer of the data from one computer to other via a proper network. And the Data is collected, interacted as well as retrieve information via the search engines. And operating system is definitely the interface, and an educated one in between user interface and the rendering engine.

4 0
2 years ago
Read 2 more answers
PLEASE HELP PROGRAMMING WILL GIVE BRAINLIEST
JulijaS [17]
The fourth choice is correct.
5 0
2 years ago
Mobile computing has two major characteristics that differentiate it from other forms of computing. What are these two character
olya-2409 [2.1K]

Answer:

mobility and broad reach  

Explanation:

The two major characteristics of mobile computing are:

Mobility: It basically refers to the portability. Mobility means that users can carry their mobile device wherever they go. This facilitates real-time communication with other devices. Users can take a mobile device anywhere and can contact with other devices and systems via a wireless network for example a user, wherever he happens to be, can log in to his email account to check his emails using his mobile phone.

Broad Reach: It basically means that the mobile device users can be reached at any time. This means that the users of an open mobile device can be instantaneously contacted. Having an open mobile device means that it can be reached by or connected to other mobile networks. However mobile users also have options to restrict specific messages or calls.

6 0
2 years ago
Suppose your name was George Gershwin. Write a complete program that would print your last name, followed by a comma, followed b
NNADVOKAT [17]

Answer:

I will write the code in C++ and JAVA      

Explanation:

<h2>JAVA CODE</h2>

public class Main

{ public static void main(String[] args) {

       // displays Gershwin,George

     System.out.println("Gershwin,George"); }  }

<h2>C++ Code:</h2>

#include <iostream>

using namespace std;  

int main()

{  cout<<"Gershwin,George"; }    

// displays last name Gershwin followed by , followed by first name George

//displays Gershwin,George as output.

6 0
2 years ago
Read 2 more answers
HELP ASAP U GET BRAINLIEST
Korolek [52]
B) <span>tool bar

i hope helped ^-^</span>
7 0
1 year ago
Read 2 more answers
Other questions:
  • When a switch configuration includes a user-defined error threshold on a per-port basis, to which switching method will the swit
    13·1 answer
  • Copy the 10 statements as they appear below into your journal.
    6·2 answers
  • Static packet filtering firewalls are limited to ________. inspecting packets for which there are good application proxy filteri
    8·1 answer
  • Write multiple if statements: If carYear is before 1968, print "Probably has few safety features." (without quotes). If after 19
    6·1 answer
  • A third-grade teacher at Potter Elementary School wants a program that allows a student to enter the amount of money a customer
    14·1 answer
  • A laptop gets replaced if there's a hardware issue. Which stage of the hardware lifecycle does this scenario belong to?
    5·1 answer
  • Assume you have a project with seven activities labeled A-G (following). Derive the earliest completion time (or early finish-EF
    15·1 answer
  • HELP 30 points and Brainliest.Type the correct answer in the box. Spell all words correctly.
    11·1 answer
  • Select all the activities Samil could so through his banking app.
    5·2 answers
  • Write a function named shout. The function should accept a string argument and display it in uppercase with an exclamation mark
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!