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
Nuetrik [128]
3 years ago
12

If you are given three sticks, you may or may not be able to arrange them in a triangle. For example, if one of the sticks is 12

inches long and the other two are one inch long, you will not be able to get the short sticks to meet in the middle. For any three lengths, there is a simple test to see if it is possible to form a triangle:
If any of the three lengths is greater than the sum of the other two, then you cannot form a triangle. Otherwise, you can. (If the sum of two lengths equals the third, they form what is called a "degenerate" triangle.)
Write a function named is_triangle that takes three integers as arguments. The function should return True or False to report whether or not the three sticks can make a triangle.
From main(), call the is_triangle function and pass it three integer values representing the length of three sticks. If the returned value of the is_triangle function is True, print Yes to the screen. Otherwise, print No to the screen.
Test Your Function
Two tests appear here for you to use. Use these buttons to test your code:
Should return No
TRY IT (STICK LENGTHS 1, 1, AND 12)
Should return Yes
TRY IT (STICK LENGTHS 12, 16, AND 24)
Submit For Grading
Once you have tested your code, submit it here for grading.
Exercise 5.1
Make sure the response you print to the screen is either Yes or No (the capitalization is important.)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

2. Exercise 5.2

A bike share program in Indianapolis allows customers to borrow a bike and charge them based on the length of their ride.

The program offers two memberships: Daily or Annual.

For Daily members, rides cost 1.50 to start + .20/minute.

For Annual members, rides cost 1.00 to start + .15/minute.

Write a function named calculate_fee that takes a string and an integer as arguments and returns the calculated fee with no dollar signs or rounding based on the user’s membership level.

From main(), call the calculate_fee function and pass both the string and integer values. The function should calculate the fee based on the membership level. Print the returned value of the calculate_fee function to the screen with no dollar signs or rounding (Do not forget the 1.50/1.00 "start ride" fee!)

Test Your Function

Two tests appear here for you to use. Use these buttons to test your code:

Should return the float 5.5

TRY IT (DAILY MEMBER TAKES A 20 MINUTE TRIP)

Should return the float 3.25

TRY IT (ANNUAL MEMBER TAKES A 15 MINUTE TRIP)

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

3. Exercise 5.3

A person’s Body Mass Index is a common measure of their fitness (whether we like it or not.)

The BMI calculation in the English system is:

((weight_in_pounds) / (height_in_inches * height_in_inches)) * 703
BMI Categories:

Underweight = <18.5
Normal = 18.5–24.9
Overweight = 25–29.9
Obese = BMI >= 30
Write a function named calculate_bmi that takes two floats as arguments and returns the calculated BMI rounded to 1 decimal place based on the user’s weight and height.

From main(), call the calculate_bmi function and pass both float values. Use the returned value of the function to determine and print the BMI Category the user falls into.

Printed Values

Your program MUST print exactly one of the following:

Underweight
Normal
Overweight
Obese
Capitalization is important!
Computers and Technology
1 answer:
Mandarinka [93]3 years ago
4 0

Answer:

True

Explanation:

You can just overlap the sticks.

You might be interested in
Write a 20 charecter poem! for points! :)
umka21 [38]
The sky was blue
Glistening clouds in the air
For the little boy had no clue
His mother sat him down on the warm chair

There’s some great news
Hitler took over
And they killed off the Jews
The little boy just wanted to show mom his 4 leaf clover
7 0
3 years ago
Read 2 more answers
A computer is a multipurpose device that accepts input processes data and produces output all according to a series of stored
yulyashka [42]
According to a series of stored procedures 
8 0
3 years ago
Next, determine if the given number is a prime number. A prime number is a number that has no positive divisors other than 1 and
Darya [45]

Answer:

Explanation:

whats the number?

6 0
3 years ago
When should students in a study session use flash cards to quiz one another?
Lina20 [59]

When drilling, students in a study session use flashcards to quiz one another. thus, Option B is the correct statement.

<h3>What do you mean by drill and practice?</h3>

The term drill and practice can be described as a way of practice characterized by systematic repetition of concepts, examples, and exercise problems.

Drill and exercise is a disciplined and repetitious exercise, used as an average of coaching and perfecting an ability or procedure.

Thus, When drilling, students in a study session use flashcards to quiz one another. Option B is the correct statement.

Learn more about drill and practice:

brainly.com/question/27587324

#SPJ1

4 0
2 years ago
Que compone una maquina Rube Goldberg (operadores mecánicos- maquinas simples – mecanismos)
Veseljchak [2.6K]

Answer:

dominoes, fans, PVC pipe, magnets, duct tape, marbles, cups or bowls, miniature toy cars, paper towel tubes, string.

------------------------------------------------------------------------------------------------------------

dominó, abanicos, tubos de PVC, imanes, cinta adhesiva, canicas, tazas o cuencos, carros de juguete en miniatura, tubos de toallas de papel, cuerdas.

Explanation:

3 0
3 years ago
Other questions:
  • Write a program that prints the day number of the year, given the date in the form month-day-year. For example, if the input is
    9·1 answer
  • A girl scout troop with 10 girl scouts and 2 leaders goes on a hike. When the path narrows, they must walk in single file with a
    12·1 answer
  • Where is the typical location of a touchpad inside of a laptop?
    13·1 answer
  • Translate the following C++ program to MIPS assembly program. *Please explain each instruction of your code by a comment and sub
    5·1 answer
  • Which of the following works on the pay-per-click (PPC) and cost-per-click (CPC) concept? ~ Plato
    9·1 answer
  • In the Dynamic Partitioning technique of memory management, the placement algorithm that scans memory from the location of the l
    11·1 answer
  • Which text features does this section contain? Check all that apply.
    15·1 answer
  • - A blacksmith is shoeing a miser's horse. The blacksmith charges ten dollars for his work. The miser refuses to pay. "Very well
    6·1 answer
  • Explain the different features available in Print command?
    10·1 answer
  • Which option ensures that items in a text box or table cell will be in the absolute center of that element?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!