Python Programming: An Introduction to Computer Science, 3rd Ed.
Python Programming: An Introduction to Computer Science, 3rd Ed.
3rd Edition
ISBN: 9781590282755
Author: John Zelle
Publisher: Franklin, Beedle & Associates
bartleby

Concept explainers

bartleby

Videos

Question
Book Icon
Chapter 3, Problem 9PE
Program Plan Intro

Area of a triangle

Program Plan:

  • Define the main function.
    • Get the values of “a”, “b”, and “c” from the user.
    • Calculate perimeter of the triangle and store it in a variable “s”.
    • Calculate area of a triangle and store it in a variable “area”.
    • Print the value of “area”.

Blurred answer
Students have asked these similar questions
The Harris-Benedict equation estimates the number of calories your body needs to maintain your weight if you do no exercise. This is called your basal metabolic rate, or BMR. The calories needed for a woman to maintain her weight is: WBMR = 655 + (4.3 × weight in pounds) + (4.7 × height in inches) − (4.7× age in years) The calories needed for a man to maintain his weight is: MBMR = 66 + (6.3 × weight in pounds) + (12.9 × height in inches) − (6.8 × age in years) A typical chocolate bar will contain around 230 calories. Write a java program that allows the user to input his or her weight in pounds, height in inches, and age in years. The program should then output the number of chocolate bars that should be consumed to maintain one’s weight for both a woman and a man of the input weight, height, and age.   NOTE: This is an application of a selection statement!  Input Data: Use a named constant for the number of calories in a “typical chocolate bar.” Use Scanner methods to enter the…
Write a C program to check whether a triangle is Equilateral, Isosceles or Scalene. a b c a = c 75 a = b = c a 30 45 60A 60° a b a Scalene Triangle 60° 75 75 60° Isosceles Triangle Equilateral Traingle
Write a program that does the following: 1) Using long format, set c to - 5.3 and a to be the angle 70 in degrees. In(c² + 5) sin(a) 2) Compute d=
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Constants, Variables, Data types, Keywords in C Programming Language Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=d7tdL-ZEWdE;License: Standard YouTube License, CC-BY