Write a program in C or Python that calculates the moment at the support (point A) depending on the amount of the load applied and the distance of the load off the point A, which will be entered by user. (Other programming languages will not be accepted).

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 20PE: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making...
icon
Related questions
Question
A Moment that arise from a load is calculated by means of the applied load multiplied by the
distance between the applied load and support. For instance: In the figure below, a load of 10 kN
is applied at 4m away from point A. In this case, the moment at the point A will be 10 kN X 4 m = 40
kN.m
10 KN
4 m
A
5 m
Write a program in C or Python that calculates the moment at the support (point A) depending on the
amount of the load applied and the distance of the load off the point A, which will be entered by user.
(Other programming languages will not be accepted).
Note: the load can be applied within the length of the beam.
Examples:
Please enter the distance of the load away from point A (0 - 5m): 4
Please enter amount of load: 10
The moment applied to point A is
40 kN.m
Process finished with exit code 0
Please enter the distance of the load away from point A (0 - 5m): 6
Please enter amount of load: 5
the distance should be between 0-5 m
Process finished with exit code 0
Please enter the distance of the load away from point A (0 - 5m): 1.2
Please enter amount of load: 8
The moment applied to point A is
9.6 kN.m
Transcribed Image Text:A Moment that arise from a load is calculated by means of the applied load multiplied by the distance between the applied load and support. For instance: In the figure below, a load of 10 kN is applied at 4m away from point A. In this case, the moment at the point A will be 10 kN X 4 m = 40 kN.m 10 KN 4 m A 5 m Write a program in C or Python that calculates the moment at the support (point A) depending on the amount of the load applied and the distance of the load off the point A, which will be entered by user. (Other programming languages will not be accepted). Note: the load can be applied within the length of the beam. Examples: Please enter the distance of the load away from point A (0 - 5m): 4 Please enter amount of load: 10 The moment applied to point A is 40 kN.m Process finished with exit code 0 Please enter the distance of the load away from point A (0 - 5m): 6 Please enter amount of load: 5 the distance should be between 0-5 m Process finished with exit code 0 Please enter the distance of the load away from point A (0 - 5m): 1.2 Please enter amount of load: 8 The moment applied to point A is 9.6 kN.m
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Structure chart
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning