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
amm1812
2 years ago
5

Given x and y, each associated with an int, write a fragment of code that associates the larger of these with another variable n

amed max.
Computers and Technology
1 answer:
solmaris [256]2 years ago
8 0

Answer:

The program to this question as follows:

Program:

x=int(input('Input the first number: ')) #defining variable x and input value by user

y=int(input('Input the second number: ')) #defining variable y and input value by user

if x > y: #if block to check value x>y

   max=x #define variable max that hold variable x value

   print('max number is: ', x) #print value

else: #else block

   max=y  #define variable max that holds variable y value

   print('max number is: ', y) #print value

Output:

Input the first number: 22

Input the second number: 33

max number is:  33

Explanation:

In the above code two-variable, "x and y" is defined, which holds a value, which is input by the variable. In the next step, the if block statement is used that can be described as follows:

  • In the if block, it will check x is greater than y it will define a variable, that is "max", that holds variable x value and prints its value.
  • In the else block, if the above condition is false it uses the max variable, that holds variable y value and prints its value.
You might be interested in
Value is always _____________ aligned in a cell. ​
Nadya [2.5K]

Answer:

Right

Explanation:

7 0
1 year ago
Use Excel to develop a regression model for the Consumer Food Database (using the "Excel Databases.xls" file on Blackboard) to p
m_a_m_a [10]

Answer:

Step 1 : Create an Indicator Variable for metro cities using formula mentioned in formula bar.

Step 2: Filter the Data on Metro cities i.e. select only those cities with Metro Indicator 1.

Step 3: Paste this filtered data to a new sheet.

Step 4: Go to Data - Data Analysis - Regression

Step 5: Enter the range of Y-variable and X-variable as shown. Select Output range and click on residuals. It will give you Output Summary and the Predicted Values along with Residuals

Please see attachment

5 0
2 years ago
Select the correct answer. Richard owns a chain of hardware stores. He wants to update the store website and write a numbered li
olga_2 [115]
What’s the answer choices ?
3 0
2 years ago
g Fill the validateForm function to check that the phone number is 10 characters long and that the user name is less than 11 cha
Rom4ik [11]

Answer:

function validateForm(event)

{

event.preventDefault();

var phoneNumber = form.phoneNumber.value;

var userName = form.userName.value;

if(phoneNumber.length!=10)

console.log("Phone Number is Invalid");

if(userName.length<11)

console.log("User Name is Invalid"); }

8 0
2 years ago
Do all of the packets in your sent messages always follow the same path? If not, describe at least two different paths packets t
Lemur [1.5K]

Answer:

All the message I sent were from the same routers

Explanation:

All the message I sent were from the same routers

5 0
2 years ago
Read 2 more answers
Other questions:
  • Which element of the word program window contains buttons for saving a document and for undoing, redoing, and repeating a change
    5·1 answer
  • The term drive app is used to describe applications stored on a computer true or false
    11·2 answers
  • In the game Beehive, you play the role of a worker bee who must watch over her hive. Your duties include (among others) directin
    12·2 answers
  • Kleene star of {1} generates {1, 11, 111, 1111, 11111……}.<br> True<br> False
    12·1 answer
  • Given three dictionaries, associated with the variables, canadian_capitals, mexican_capitals, and us_capitals, that map province
    11·1 answer
  • Big Data often involves a form of distributed storage and processing using Hadoop and MapReduce.
    12·1 answer
  • Gwen recently purchased a new video card, and after she installed it, she realized she did not have the correct connections and
    6·1 answer
  • Write a function named max that accepts two integer values as arguments and returns the value that is the greater of the two. Fo
    12·1 answer
  • Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 3, print "To
    9·1 answer
  • Define a method printAll() for class PetData that prints output as follows with inputs "Fluffy", 5, and 4444. Hint: Make use of
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!