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
zaharov [31]
3 years ago
11

HW2.24. Statement: Area of a Triangle The area of a triangle can be computed by knowing the base and height of the triangle usin

g the following formula: (the dot is mathematical notation for multiplication) Write a Python statement that assigns the variable area to the value computed by the above formula using variables base and height.
Computers and Technology
1 answer:
MArishka [77]3 years ago
3 0

Answer:

The python statement is:

area= 0.5 * base * height

Explanation:

Given

\frac{1}{2}\ .\ base\ .\ height

Required

Write an equivalent python statement

From the question, we understand that the expression be assigned to variable area.

So, the  equivalent python statement is:

area= 0.5 * base * height

Where

\frac{1}{2} = 0.5

It can also be written as:

area = base * height / 2

It can also be written as:

area = 1/2 * base * height

All the above statements are equivalent to:

\frac{1}{2}\ .\ base\ .\ height

You might be interested in
// This pseudocode is intended to display // employee net pay values. All employees have a standard // $45 deduction from their
Vikki [24]

Answer:

C++ code is given below

Explanation:

#include<iostream>

#include <cstring>

using namespace std;

int housekeeping(string EOFNAME);

int mainLoop(string name,string EOFNAME);

int finish();

void main()

{

  string name;

  string EOFNAME = "ZZZZ";

  cout << "enter the name" << endl;

  cin >> name;

  if (name != EOFNAME)

  {

      housekeeping(EOFNAME);

  }

  if (name != EOFNAME)

  {

      mainLoop(name , EOFNAME);

  }

  if (name != EOFNAME)

  {

      finish();

  }

  system("pause");

}

int housekeeping(string EOFNAME)

{  

  cout << "enter first name " << EOFNAME << " to quit " << endl;

  return 0;

}

int mainLoop(string name, string EOFNAME)

{  

  int hours;

  int rate,gross;

  int DEDUCTION = 45;

  int net;

  cout << "enter hours worked for " << name << endl;

  cin >> hours;

  cout << "enter hourly rate for " << name << endl;

  cin >> rate;

  gross = hours*rate;

  net = gross - DEDUCTION;

  if (net > 0)

  {

      cout << "net pay for " << name << " is " << net << endl;

  }

  else

  {

      cout << "dedections not covered.net is 0.";

  }

  cout << "enter next name or " << EOFNAME << " to quit" << endl;

  cin >> name;

  return 0;

}

int finish()

{

  cout << "end of job"<<endl;

  return 0;

}

3 0
4 years ago
Write a C++ program that computes an approximation of pi (the mathematical constant used in many trigonometric and calculus appl
Verizon [17]

Answer:

#include <iostream>

#include<cmath>

using namespace std;

int main()

{

double total = 0;

double check=1;

double ct=0;

double old=1;

while( fabs(total - old) > 0.00005 )

{

old=total;

total=total+check*4.0/(2.0*ct+1);

ct=ct+1;

check=0.0-check;

}

cout<<"Approximate value of pi is "<<total<<endl;

return 0;

}

Explanation:

  • Initialize all the necessary variables.
  • Run a while loop until the following condition is met.

fabs(total - old) > 0.00005

  • Inside the while loop calculate the total value.
  • Lastly, display the approximate value of pi.
3 0
4 years ago
Which statement is true?
lbvjy [14]

Answer:

1. A deque is a type of collection.

Explanation:

7 0
3 years ago
Read 2 more answers
How can an administrator initiate a system state recovery using the command line?
LUCKY_DIMON [66]

A leader creates a system state recovery utilizing the power cord wbadmin start system state recovery.

<h3>What is the power to start a system state restoration?</h3>
  • Windows has a built-in tool that lets you back up and repairs a server's system state, which is quick and easy to use.
  • The Wbadmin can be operated with the Start System State Backup order to create a blockage of the system state for a computer and the Start System State Recovery order to restore the system state.
  • Use the order -backuptarget:\\servername\sharedfolder\ to store system state backups.
  • Runs the power without prompts to the user.
  • The System State information reference in Backup Manager lets you support the design of your working system and vital system features such as the Registry, boot files, SYSVOL directory, and Active Directory.

To learn more about, start system state recovery, refer to:

brainly.com/question/24180931

#SPJ4

4 0
2 years ago
Which of the following is true of a transition?
BaLLatris [955]
Answer choice c is correct
8 0
2 years ago
Other questions:
  • On five lane roadways, the center lane is designated for __________ and is used by vehicles traveling in both directions.
    14·1 answer
  • In the lan protocol architecture the _________ layer is responsible for detecting errors and discarding any frames that are in e
    13·1 answer
  • Which business application uses location information to provide a service and is designed to give mobile users instant access to
    5·1 answer
  • Windows domain policy to disable windows 10 update
    7·1 answer
  • For your biology class, you have taken a number of measurements for A plant growth experiment. you wish to create a chart that s
    6·1 answer
  • Which recovery method usually involves an evasion effort and is dependent on the ip's condition?
    11·1 answer
  • What piece of software tells the operating system how to use a specific hardware device? a. User interface b. System service c.
    14·1 answer
  • Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
    11·1 answer
  • What describes a relationship between edge computing and cloud computing?
    6·1 answer
  • Where is the fill handle located
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!