//CODEvoid f(int a){while(a--) {static int n = 0;int x = 0;cout << "n: " << n++ << " ,x: " << x++ << endl;}}int main(){f(3);return 0;}Question: What is the output of the above code?

Answers

Answer 1

Answer:

The static n variable is incremented twice and the results printed in the console but the output of the x variable remains constant.

Explanation:

The while loop in the C++ source code increments the n variable as the argument of the function "a" is decremented. The n variable output is 0,1, and 2 while the x variable is 0 for every iteration.

//CODEvoid F(int A){while(a--) {static Int N = 0;int X = 0;cout &lt;&lt; "n: " &lt;&lt; N++ &lt;&lt;

Related Questions

Functionality testing is primarily used with ____________. firewall protection software development hardening servers server testing

Answers

Answer:

software development

Explanation:

Functionality testing may be defined as the process of quality assurance. It is a type of a black box testing which bases its test cases to the specification of the software component.

Software testing is done to evaluate the compliance of the system. It is mainly used for software testing.

Some of the types of the software testing are :

-- smoke testing

-- component testing

-- system testing

-- unit testing

-- integration testing

Which is the OS that can be obtained for free or at a much lower price than other major operating systems?

a. Apple's OS X
b. Microsoft's Windows 8
c. Linux

Answers

Linux C
Reason: Linux is a free, open source operating system, released under the GNU General Public License (GPL). Anyone can run, study, modify, and redistribute the source code, or even sell copies of their modified code, as long as they do so under the same license.
Pretty sure it’s B hope dis helps

what's a good online University to attended for cyber security certificate.?

Answers

Answer:

If your in the UK, a great university to attend is Lancaster University for a cyber security certificate.

Explanation:

Cora is writing a program to make a motorcycle racing game. If Cora wants the speed of the motorcycle to appear on the screen when the game is played, then Cora needs to add something to the code that will make the speed a(n) _____.
A. input
B. output
C. Boolean value
D. conditional statement

Answers

The answer would be C

Cora needs to add something to the code that will make the speed a(n) and that is the C. Boolean value.

What is a Boolean value?

In pc programming, Boolean values are used to create situations and manipulate how this system behaves whilst sure matters happen (e.g.: if a circumstance is true, then do something). They may have handiest feasible values: both zero or 1. You can not upload or subtract them.

The Boolean value will add up the value to the code that will make the speed.

Read more about the code :

https://brainly.com/question/3653791

#SPJ2

Design a for loop that gets 6 integer numbers from a user, accumulates the total of them, then displays the accumulated total to the user. Just write the code segment to show what is asked, not a complete program. However, declare any variables that you need to use. Use a semicolon (;) at the end of each line of code so I can tell when you use a new line in your code.

Answers

Answer:

Explanation:

The following loop code is written in Java and asks the user for the 6 integer numbers as mentioned in the question and sums them up. Finally putting them into a variable named total and printing it out.

       int total = 0;

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

           Scanner in = new Scanner(System.in);

           System.out.println("Enter an integer: ");

           total += in.nextInt();

       }

       System.out.println("Your total is: " + total);

A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output is the miles walked.
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
printf("%0.2lf", yourValue);
Ex: If the input is:
5345
the output is:
2.67
Your program must define and call a function:
double StepsToMiles(int userSteps)
#include
/* Define your function here */
int main(void) {
/* Type your code here. */
return 0;
}

Answers

Answer:

The complete program is:

#include <stdio.h>

double StepsToMiles(int userSteps){

   return userSteps/2000.00;

}

int main(void) {

   int userSteps;

   printf("User Steps: ");

   scanf("%d",&userSteps);

   printf("%0.2f", StepsToMiles(userSteps));

   return 0;

}

Explanation:

This line defines the function

double StepsToMiles(int userSteps){

This returns the required output by dividing userSteps by 2000.

We used 2000.00 because we want it to return a floating point number

   return userSteps/2000.00;

}

The main begins here

int main(void) {

This declares userSteps as integer

   int userSteps;

This prompt user for input

   printf("User Steps: ");

This gets user input

   scanf("%d",&userSteps);

This calls the function and also returns the required output to 2 decimal places

   printf("%0.2f", StepsToMiles(userSteps));

   return 0;

}

Answer:

Coral Language Code

A pedometer treats walking 2,000 steps as walking 1 mile. Define a function named StepsToMiles that takes an integer as a parameter, representing the number of steps, and returns a float that represents the number of miles walked. Then, write a main program that reads the number of steps as an input, calls function StepsToMiles() with the input as an argument, and outputs the miles walked.

Output the result with four digits after the decimal point, which can be achieved as follows:

Put result to output with 4 decimal places

If the input of the program is:

5345

the function returns and the output of the program is:

2.6725

Your program should define and call a function:

Function StepsToMiles(integer userSteps) returns float numMiles

Explanation:

Function StepsToMiles(integer userSteps) returns float numMiles

  numMiles = userSteps / 2000.0

 

Function Main() returns nothing

  float result

  integer userSteps

  userSteps = Get next input

  result = StepsToMiles(userSteps)

  Put result to output with 4 decimal places

10. In cell R8, enter a formula using the AVERAGEIF function to determine the average number of post-secondary years for students who have been elected.

Answers

Answer:

On cell R8, type in the formula  "=AVERAGEIF(M2:M31,"Elected",D2:D31)".

Explanation:

Microsoft Excel is a spreadsheet application developed by Microsoft as a part of the office package, used for statistical analysis of data. It has several tools used for this purpose.

The AVERAGEIF function is used to give the average of numeric column based on a condition. The formula above uses the word 'Elected' in the M column to calculate the average of numbers in the D column.

The formula to enter in cell R8 is =AVERAGEIF(M2:M31,"Elected",D2:D31)

The AVERAGEIF function is used to calculate the average of a range of numbers if a certain condition is true.

From the complete question,

The range is M2 to M31

The condition is to check is the students in range D2 to D31 have been elected

The syntax of the AVERAGEIF function

=AVERAGEIF(range,criteria,average_range)

So, the formula to enter in cell R8 is =AVERAGEIF(M2:M31,"Elected",D2:D31)

Read about Excel formulas at:

https://brainly.com/question/14299634

During which part of the international

Answers

????

can you elaborate? I want to help you

A. Write a Python program to match key values in two dictionaries. Input: {'key1': 1, 'key2': 3, 'key3': 2}, {'key1': 1, 'key2': 2} Output: key1: 1 is present in both x and yB. Write a Python program to sort Counter by value. Input: {'Math': 81, Physics':83, 'Chemistry':87) Output: [('Chemistry', 87), ('Physics', 83), ('Math', 81)

Answers

Answer:

Please find the attachment of the code file and its output:

Explanation:

In the first code, two variable "a, b" is defined that holds dictionary value which is defined in the question, in the next step a for loop is declared that hold dictionary key and value and use a method set to check the value is available in the dictionary and use print method to print its value.

In the second code, a package counter is an import as the c for count value, in the next step a variable a is declared, that uses a counter method to hold a dictionary value in its parameter, and in the print method, it uses sort method to print its value.

Write a print10() method that takes an array as a parameter and prints out the first 10 words of the array.

Answers

Answer:

This question is answered using Java programming language:

public static void print10(String[]arr){

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

System.out.println(arr[i]);

    }

}

Explanation:

This line defines the method

public static void print10(String[]arr){

This iterates from 0 to 9 index of the array. In other words, 1st to 10th

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

This prints the required output (one on a line)

System.out.println(arr[i]);

    }

}

Refer to attachment for the complete program that includes the main method.

Following are the program to count array words:

Program Explanation:

Defining a class "Main".Inside the class, a method "print10" is declared that takes an array of string inside the parameter, and define a for loop that prints 10 string value.Outside the method, the main method is declared that defines the array of strings that holds string value and passes the value into the method "print10" and prints its value.

Program:

public class Main //defining a class Main

{

private static void print10(String[] di)//defining a method print10  

{

System.out.println("First 10 words in string array: ");//print message

for(int i=1; i<11; i++)//defining a loop that prints array value

{

System.out.println(i+"\t "+di[i]);//print array value

}

}  

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

{

String[] di = {"Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Julie", "Kilo", };//defining array of String that hold value

print10(di);//calling method and print its value

}

}

Output:

Please find the attached file.

Learn more:

brainly.com/question/7052857

Lola wants to install an add-in in Excel.She has to unblock the add-in to allow Excel to open the add-in file automatically.To do this,she right clicks on the add-in file and selects an option from the menu. What could the option be?
A) Copy
B) Delete
C) Rename
D) Properties

Answers

Answer:

The correct answer is:

Properties (D)

Explanation:

First of all, option D (Properties) is the option that makes the most sense in this scenario, because the other options: Copy, Delete, and Rename are unrelated commands to what is to be achieved.

Secondly and more practically, an add-in file may not load in excel, and most of the time it is blocked by default and has to be unblocked. The following steps are used:

1. close Excel if it is open

2. open the folder where the add-in file is located, right-click on the add-in file, and select "properties"

3. a display tray will appear, having the attributes: Read-only, Hidden, Advanced, and unblock. Click the checkbox against "unblock" and make sure it is checked.

4. click Apply and Click Ok

Voila, your add-in file is unblocked.

N:B The Images are for steps 2 and 3

Whats wrong with this code​

Answers

You're not adding your temperature to the total so total will always be 0. Do something like this:

total += float(input("Enter Temperature: "))

You can directly add the user entered value without creating an extra variable.

Something I should look for when trying to decide if a source is credible is the publication's ....
1.pictures
2.date
3.popularity
4.front cover ​

Answers

Answer: Date

Explanation: We receive new information everyday, and things are always changing. If something is old, it may need to be updated with the correct information

Describe the main roles of the communication layer, the network-wide state-management layer, and the network-control application layer in an SDN controller.

Answers

Answer:

1.

Role of communication layer:

-it has the responsibility of transferring information among network controlled devices.

-it provides up to date view of the state of the network to SDN controller which shows that a new device has being added to the network as well as the link that was attached being non-existent.

2.

Role of network wide state management layer:

-it is responsible for the controller having the network's state information

-it also helps in the making of ultimate control decisions.

c

role of network control application layer:

- It is responsible for the reading and also the writing of the state of the network as well as flow tables which are in the layer of state management.

- It also notifies of changes such as state-event change. this helps to take actions with regards to the event notification.

Write a program that demonstrates the class by creating a Payroll object, then asking the user to enter the data for an employee.

Answers

Answer:

import java.util.Scanner;

public class Payroll {

   //set variable field

   private String name;

   private int idNumber;

   private double hourlyRate;

   private int hoursWorked;

   private double grossPay;

   //methods to get values of private class variables

   public String getName()

    {

        return name;

    }

   public int getIdNumber()

   {

      return idNumber;

   }

   public double getHourlyRate()

   {

       return hourlyRate;

   }

   public int getHoursWorked()

   {

       return hoursWorked;

   }

   public double getGrossPay()

   {

      return hoursWorked * hourlyRate;

   }

   //methods to initialize or change the private class values.

   public void setName( String nameGiven)

   {

       name = nameGiven;

   }

   public void setIdNumber(int idNumberGiven)

   {

       idNumber = idNumberGiven;

   }

   public void setHourlyRate(double rateGiven)

   {

       hourlyRate = rateGiven;

   }

   public void setHoursWorked(int hoursGiven)

   {

      hoursWorked = hoursGiven;

   }

   //Constructors

   public Payroll(String nameGiven, int idNumberGiven, double rateGiven, int hoursGiven)

   {

       name = nameGiven;

       idNumber = idNumberGiven;

       hourlyRate = rateGiven;

        hoursWorked = hoursGiven;

   }

 

   public static void main(String[] args)

   {

       double userGrossPay;

       String userEmplName;

       int userIdNum;

       double userRate;

       int userHours;

       Scanner scanner = new Scanner(System.in);

       System.out.print("Enter employee's name:");

       userEmplName = scanner.nextLine();

      System.out.print("Enter employee's ID number:");

       userIdNum = scanner.nextInt();

       System.out.print("Enter hourly rate:");

       userRate = scanner.nextDouble();

       System.out.print("Enter number of hours worked:");

       userHours = scanner.nextInt();

        Payroll payroll1 = new Payroll(userEmplName, userIdNum, userRate, userHours);

 

      payroll1.setName(userEmplName);

       payroll1.setIdNumber(userIdNum);

       payroll1.setHourlyRate(userRate);

       payroll1.setHoursWorked(userHours);

 

       System.out.printf(userEmplName + ", employee number " + userIdNum + ", made $%.2f in gross pay.\n", payroll1.getGrossPay());

}

}

Explanation:

The class "Payroll" is used to hold data of employees to be paid. the main function creates an instance of the class "payroll1", sets the name, id-number, hourly rate, and hours worked by the employee, then prints on screen the details of the payroll1 object.

Is the willingness to put a customer’s needs above ones own needs and to go beyond a job description to achieve customer satisfaction

Answers

Answer:

customer-serious orientation

Explanation:

Customer-serious orientation can be defined as the willingness to put a customer’s needs above ones own needs and to go beyond a job description to achieve customer satisfaction.

This ultimately implies that, a customer-serious oriented business firm or company puts the needs, wants and requirements of its customers first without considering their own needs in a bid to satisfy and retain them.

Hence, customer-serious orientation requires the employees working in an organization to show and demonstrate positive attitudes and behaviors at all times.

What is the output of the following code
X = 06
y = 0
print (x ** y)

Answers

Answer:

x=6 and y=0

Explanation

Please could you help me
Task 4
Decode this:
010010010110011000100000011110010
110111101 10101001000000110001101
1000010110111000100000011110011​

Answers

Answer:

is this a among us reference oooorr...... im confused. are u being frfr ...?

Explanation:

Answer:

hmmmm its decode

Explanation:

decode

5.19 LAB: Exact change - functions
Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per line. The coin types are dollars, quarters, dimes, nickels, and pennies. Use singular and plural coin names as appropriate, like 1 penny vs. 2 pennies.

Ex: If the input is:

0
or less, the output is:

no change
Ex: If the input is:

45
the output is:

1 quarter
2 dimes
Your program must define and call the following function. The function exact_change() should return num_dollars, num_quarters, num_dimes, num_nickels, and num_pennies.
def exact_change(user_total)

Answers

Answer:

def exact_change(user_total):

    if user_total <=0:

         print("No change")

    else:

         num_dollars = int(user_total/100)

         user_total = user_total % 100

         num_quarters= int(user_total/25)

         user_total = user_total % 25

         num_dimes= int(user_total/10)

         user_total = user_total % 10

         num_nickels= int(user_total/5)

         num_pennies= user_total % 5

         if num_dollars >= 1:

              if num_dollars == 1:

                   print(str(num_dollars)+" num_dollars")

              else:

                   print(str(num_dollars)+" amountdollars")

         if num_quarters>= 1:

              if num_quarters== 1:

                   print(str(num_quarters)+" quarter")

              else:

                   print(str(num_quarters)+" quarters")

         if num_dimes>= 1:

              if num_dimes== 1:

                   print(str(num_dimes)+" dime")

              else:

                   print(str(num_dimes)+" dimes")

         if num_nickels>= 1:

              if num_nickels== 1:

                   print(str(num_nickels)+" nickel")

              else:

                   print(str(num_nickels)+" nickels")

         if num_pennies>= 1:

              if num_pennies== 1:

                   print(str(num_pennies)+" penny")

              else:

                   print(str(num_pennies)+" pennies")

           

user_total = int(input("Enter user_total Here:  "))

exact_change(user_total)

Explanation:

The explanation is long. So, I added it as an attachment.

Answer:

Written in Python:

def exact_change(user_total):

   num_dollars = user_total // 100 #convert to dollars

   user_total %= 100 #get remainder after conversion

   num_quarters = user_total // 25 #convert to quarters

   user_total %= 25 #get remainder after conversion

   num_dimes = user_total // 10 #convert to dimes

   user_total %= 10 #get remainder after conversion

   num_nickels = user_total // 5 #convert to nickels

   user_total %= 5 #get remainder after conversion

   num_pennies = user_total

   return(num_dollars, num_quarters, num_dimes, num_nickels, num_pennies)

if __name__ == '__main__':

   input_val = int(input()) #prompt user to input an integer

   num_dollars, num_quarters, num_dimes, num_nickels, num_pennies = exact_change(input_val) #recall exact_change function

   

   #define output statements to output number of exact_change variables:  

   #num_dollars, num_quarters, num_dimes, num_nickels, num_pennies  

   if input_val <=0: #if amount is zero

       print('no change') #print output

       

   else:

       if num_dollars > 1: #if number of dollars is greater than one

           print('%d dollars' % num_dollars) #print number of dollars

       elif num_dollars == 1: # if number of dollars equal 1

           print('%d dollar' % num_dollars) #print dollar in singular

       

       if num_quarters > 1: #if number of quarters is greater than one

           print('%d quarters' % num_quarters) #print number of quarters

       elif num_quarters ==1: # if number of quarters equal 1

           print('%d quarter' % num_quarters) #print quarter in singular

       

       if num_dimes > 1: #if number of dimes is greater than one

           print('%d dimes' % num_dimes) #print number of dimes

       elif num_dimes == 1: # if number of dimes equal 1

           print('%d dime' % num_dimes) #print dime in singular

           

       if num_nickels > 1: #if number of nickels is greater than one

           print('%d nickels' % num_nickels) #print number of nickels

       elif num_nickels == 1: # if number of nickels equal 1

           print('%d nickel' % num_nickels) #print nickel in singular

       

       if num_pennies >1: #if number pennies is greater than one

           print('%d pennies' % num_pennies) #print number of pennies

       elif num_pennies ==1: # if number of pennies equal 1

           print('%d penny' % num_pennies) #print penny in singular

Explanation:

It's really long, but it's necessary to get all the correct answers.

According to a survey of hikers on a trail, 50% of the hikers like Gatorade (G) and 40% like energy bars (E). 20% like both. Assume random selection:____________ a. Find the probability that a hiker likes Gatorade or energy bars b. If a hiker likes Gatorade, find the probability that he likes energy bars c. If a hiker likes energy bars, find the probability that he likes Gatorade.

Answers

Answer:

Explanation:

As per given data

Probability hikers like Gatorade (G) = P(G) = 50% = 0.5

Probability hikers like energy bars = P(E) = 40% = 0.4

Probability hikers like both = P(G and E) = 20% = 0.2

a)

To find the probability that a hiker likes Gatorade or energy bars use the following formula

P(G or E) = P(G) + P(E) - P(G and E )

P(G or E) = 0.5 + 0.4 - 0.2

P(G or E) = 0.7

b)

To find the probability that a hiker likes Gatorade or energy bars use the following formula

P(E|G) = P(E and G)/P(G)

P(E|G) = 0.2/0.5

P(E|G) = 0.4

c)

The probability that he likes Gatorade.

P(G|E) = P(G and E) / P(E)

P(G|E) = 0.2 / 0.4

P(G|E) = 0.5

Normalization works through a series of stages called normal forms. For most purposes in business database design, _____ stages are as high as you need to go in the normalization process.

a. two
b. three
c. four
d. five

Answers

I do believe it’s A.....

Normalization works through a series of stages called normal forms. For most purposes in business database design, three stages are as high as you need to go in the normalization process.

Normalization is the process of organizing and structuring a database in a way that reduces redundancy, dependency, and anomalies while improving data integrity and efficiency. It involves applying a set of rules and guidelines to design a database schema that minimizes data redundancy and ensures data consistency.

The primary goal of normalization is to eliminate data anomalies such as insertion, update, and deletion anomalies, which can occur when data is duplicated or dependencies between data elements are not properly managed.

Learn more about database on:

https://brainly.com/question/30163202

#SPJ6

Instructions

Drag and drop to arrange the port types in

order of their speed capability from lowest

to highest

[See keyboard instructions here.

Answers

Answer:

The answer is below

Explanation:

Given that there are no specific options here. Here are some of the most common port types in order of their speed capability from lowest to highest.

In Bytes and Bits per second, that is:

1. USB 1.1 = 1.5 MB/s - 12Mbit/s

2. Firefire 400 = 50 MB/s - 400Mbit/s

3. USB 2.0 = 60 MB/s - 480Mbit/s

4. FireWire 800 = 100 MB/s - 800Mbit/s

5. USB 3.0 = 625 MB/s - 5Gbit/s

6. eSATA = 750 MB/s - 6Gbit/s

7. USB 3.1 = 1.21 GB/s. - 10Gbit/s

8. Thunderbolt = 1.25 GB/s * 2 (2 channels) - 10Gbit/s * 2 (2 channels)

9. Thunderbolt 2 = 2.5 GB/s - 20Gbit/s

10. Thunderbolt 3 = 5 GB/s - 40Gbit/s

What is the computer software? Does a hardware can work without software?

Answers

Answer:

Hope this helped!

Explanation:

A computer software is anything that lets you work with computers what happens inside it, and hard ware is the actual computer and its parts, so no a computer hardware CANNOT work without a software.

Answer:

computer software is the collection of data or computer instructions that tell computer how to work.

Hardware and software are interconnected to each other, with software the hardware of computer wouldn't have any function.

Please Helpppp Me User Interface Design ensures that the interface has elements that are easy to ________________. (Choose all that apply)


Question 1 options:


a) access



b) understand



c) change location



d) remove



e) use to facilitate actions

Answers

Answer:

understand is the answer

what are the elements in a publication called​

Answers

Answer:

There are several important elements in a magazine layout, such as headline, image, image caption, running head, byline, subhead, body copy, etc. Here, we look into the ten most crucial elements of a magazine layout.

Answer:

MARK AS BRAINLIEST ANSWERS

PLZ FOLLOW ME

Explanation:

There are several important elements in a magazine layout, such as headline, image, image caption, running head, byline, subhead, body copy, etc.

HOPE IT HELPS YOU

A company has three (3) components in a system and requires all three to be operational for 24 hours, Monday to Friday. Failure of component 1 occurs as follows: Monday = No failure. Tuesday = 5 a.m. to 7 a.m. Wednesday = No failure. Thursday = 4 p.m. to 8 p.m. Friday = 8 a.m. to 11 a.m. Directions: Using the scenario above, respond to the items below. Calculate the MTBF (Mean Time Between Failures) and MTTR of component 1. Show your steps of how you calculated the MTBF. Steps: MTBF = Total Uptime / Number Failures Total Uptime = (Number of Days Required Operational x Hours per Day Available) - Number of Hours Not Available MTTR = Total Downtime / Number of Failures What does the MTBF measurement tell you about the goal of having 99.999% uptime or Information Availability on system components?

Answers

Answer:

Following are the code to this question:

#include<stdio.h>//defining header file

//using namespace std;

int main()//defining main method

{

float MTBF, MTTR, Total_up;//defining float variable

Total_up = (4 * 24) - 9;//defining Total_up variable that calculate Total uptime value

MTBF = Total_up / 3.0;//defining MTBF variable that calculate its value

MTTR = 9 / 3;//defining MTTR that calculate its value

printf("\n The total value of MTBF: %f",MTBF);//print value with message

printf(" \n The total value of MTTR: %f ",MTTR);//print value with message

return 0;

}

Output:

The total value of MTBF: 29.000000  

The total value of MTTR: 3.000000  

Explanation:

In the above-given code, three float variable "MTBF, MTTR, and Total_up" is defined, in the next step the "Total_up" variable is defined, that holds a value to calculate its value.

In the next step, the "MTBF, and MTTR" variable is defined, and in the "MTBF" variable, it uses Total_up variable value to calculate its value and use the print method to print the "MTBF and MTTR" value.

Who is responsible for developing the physical background for the characters by creating buildings, landscapes, and interiors?

A. costume designer
B. art director
C. director
D. cinematographer

Answers

Answer:

B. Art Director

Explanation:

Plato

Write a Python3 program to check if 3 user entered points on the coordinate plane creates a triangle or not. Your program needs to repeat until the user decides to quit, and needs to deal with invalid inputs.

Answers

Answer:

tryagain = "Y"

while tryagain.upper() == "Y":

    x1 = int(input("x1: "))

    y1 = int(input("y1: "))

    x2 = int(input("x2: "))

    y2 = int(input("y2: "))

    x3 = int(input("x3: "))

    y3 = int(input("y3: "))

    area = abs(x1 *(y2 - y3) + x2 * (y1 - y3) + x3 * (y1 - y2))

    if area > 0:

         print("Inputs form a triangle")

    else:

         print("Inputs do not form a triangle")

    tryagain = input("Press Y/y to try again: ")

Explanation:

To do this we simply calculate the area of the triangle given that inputs are on plane coordinates i.e. (x,y).

If the area is greater than 0, then it's a triangle

If otherwise, then it's not a triangle.

This line initializes iterating variable tryagain to Y

tryagain = "Y"

while tryagain.upper() == "Y":

The following lines get the coordinates of the triangle

    x1 = int(input("x1: "))

    y1 = int(input("y1: "))

    x2 = int(input("x2: "))

    y2 = int(input("y2: "))

    x3 = int(input("x3: "))

    y3 = int(input("y3: "))

This calculates the area

    area = abs(x1 *(y2 - y3) + x2 * (y1 - y3) + x3 * (y1 - y2))

This checks for the condition stated above.

    if area > 0:

         print("Inputs form a triangle") This is printed, if true

    else:

         print("Inputs do not form a triangle") This is printed, if otherwise

    tryagain = input("Press Y/y to try again: ") This prompts the user to try again with another set of inputs

(Python)Write an expression using Boolean operators that prints "Eligible" if user_age is greater than 17 and not equal to 25.


Sample output with input: 17

Ineligible

Answers

user_age = input("Input Age: ")

if int(user_age) <= 17:

   print("Ineligible")

elif int(user_age) == 25:

   print("Ineligible")

else:

   print("Eligible")

:Here is some basic code.  It takes an input, turns it into an int type value, and checks the parameters that you gave me.  It errors out when you put in anything but a number.

Answer:

user_age = int(input())

if (user_age > 17) and (user_age != 25):

   print('Eligible')

else:

   print('Ineligible')

Explanation:

the code is very easy to do because it asks for it in Boolean operators.  So user_age = int(input()) ## asks for user input

then it checks the status by seeing if the number is greater than 17 and not equal to 25.  we know that > is greater and we know that != means not equal.  Therefore, this will rule out both and then give the eligible or ineligible statement.

Which of these usually runs in the background without much
interaction with the user?
A
systems software
B
application software
C
a GUI
D
input/output devices

Answers

Answer:

A:System Software is the answer

Other Questions
Create some non-contextand background. yes or No?Explain? How many department stores have exactly 37 pairs of glasses? HELP ASAP PLS a 35.0 g block of copper is dropped into 450 grams of waterat 21.5 C. The temperature of the water changes to 22.3 C. Does the water's temperature rise or fall? Help please Im really having trouble on my class work please help w all 3 Where does anaerobic respiration occur in the cell?MitochondriaCytoplasmCell membraneNucleus What is the value of the expression below when x=1? 4x + 5 realidades 1 actividad 5I need answersfor spanish Thanks !!!!!!! 00 take the horse to overtake the17. A car completes a journey at an average speed of 40 km/h. At whatspeed must it travel on the return journey if the average speed for thecomplete journey (out and back) is 60 km/h?Help what is 0.34 of 112? What is the solution to the equation 9(x + 1)27? (1 point) 5/6 + (-4/9)-(-2) ?????? 4. How many mugs could you make with 360 spoonfuls of cocoa mix? Oxygen is a reactant of___(1)___while being the product for___(2)___. Why does Wilson believe that the judges will act with intrepidity (fearlessness) in exercising judicial review. In other words, why wouldn't they feel pressured to act or rule in a certain way? Pontiac's Rebellion was an effort to remove ___ settlers from the area west of the Appalachians.A.Spanishb. Indianc.FrenchdRussian Trayvon wants to find out if tomato plants produce more tomatoes when they are fertilized. He grows 5 plants with fertilizer and 10 plants without fertilizer, and plans to compare the results. Which is the most appropriate quantity to measure for each group of plants Please help I really would appreciate it Who is the photographer of the above image? Using complete sentences, explain the impact of large-scale agriculture in the southwestern United States on our water supply. In early 2018 businesses bought more inventory, increasing GDP. What would happenif consumers didn't buy those goods?