CSIS2101_assgn7
.docx
keyboard_arrow_up
School
Nova Southeastern University *
*We aren’t endorsed by this school
Course
2101
Subject
Physics
Date
Jan 9, 2024
Type
docx
Pages
4
Uploaded by the831unit
Assignment 7
Question 1
( 100 points)
Menu Program
Write a Python program named weights_firstname that finds the Weights of objects in Newton
on different planets and satellites like Earth, Mars, Moon and Saturn.
Your mass in Kilograms is a constant in all planets and satellites.
But your weight is different and is calculated as W = m * g
Where m is your mass in Kg and g is the gravity on the planet in m/s
2
In this file there should be four methods defined.
•
Write a method named weight_earth_firstname, which accepts the mass of an object in
Kilograms as an argument into the function. The method should calculate the weight of
the object and
return
the weight on Earth in Newtons. The formula for calculating the
weight of an object on Earth is given below.
•
Write a method named weight_mars_firstname, which accepts the mass of an object in
Kilograms as an argument into the function. The method should calculate the weight of
the object and
return
the weight on Mars in Newtons. The formula for calculating the
weight of an object on Mars is given below.
•
Write a method named weight_moon_firstname, which accepts the mass of an object in
Kilograms as an argument into the function. The method should calculate the weight of
the object and
return
the weight on Moon in Newtons. The formula for calculating the
weight of an object on Moon is given below.
•
Write a method named weight_saturn_firstname, which accepts the mass of an object in
Kilograms as an argument into the function. The method should calculate the weight of
the object and
return
the weight on Saturn in Newtons. The formula for calculating the
weight of an object on Saturn is given below.
•
You don’t have to define a main in this program.
Now Write a Python program named
menu_firstname
that asks the user to find weights of 3D
objects. The program will then present the following menu of selections:
a)
Weight of an object in Newtons on Moon.
b)
Weight of an object in Newtons on Earth.
c)
Weight of an object in Newtons on Mars.
d)
Weight of an object in Newtons on Saturn.
e)
Exit the program.
This program should import weights_firstname.py
using the command
import weights_firstname
and should be able to use the functions from that file.
Write a void method named menu_lastname that displays the menu of selections. This
method should not accept any arguments.
The main in the program should keep running and continue to display the menu until the user
enters “e” to exit the program.
If the user selects an invalid choice from the menu, the program should display an error
message. “Invalid Menu Option. Please pick a valid option”
Based on the option entered, corresponding weight function from the other file is invoked
and the weight is displayed by the Menu program. The menu program should display the
weight in the corresponding planet or satellite based on the menu option chosen.
For any valid option on the menu entered, the menu program should ask for two inputs the
mass and the units.
o
Make sure that the mass is a positive number greater than 0 and the units is “lbs”.
o
Write
ONLY
one valid_input_firstname program in the Menu file which returns True
if both input are valid.
o
This function can be reused for all menu options.
o
Once the input is validated, convert the weight into kilograms and it calls the
corresponding weight function in the other file passing in the mass in kilograms and
which returns the weight in Newtons.
o
Please note that the input mass of the object is validated
in pounds and the input for
every function in the other file is kilograms to compute weight in Newtons.
o
The Weight in Newtons and the planet is displayed. Format the weight output to three
decimals
As usual submit the two files in the form of a zip file
Add comments to show what each function does.
Here is the formula used for weight calculation:
Weight in Newtons = Mass in Kilogram * g
( where
g is the gravitational acceleration on each planet in m/s
2
. )
g on Earth = 9.81
m/s
2
g on Moon = 1.62
m/s
2
g on Mars = 3.77
m/s
2
g on Saturn = 10.39
m/s
2
Conversion of Pounds into Kilogram uses the formula:
1 Kilogram = 2.2 Pounds
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
A. Fill in the table completely with the correct answer as required.
Picture/Situation
Magnitude
Direction
Scalar or Vector
(if none, write NONE)
1. A boy is running at 8 m/s to
the north.
2. A box has a mass of 35
kilograms.
3. The length of the table is
2.5 meters.
4. The weight of the student is
500 newtons.
B. Determine the resultant vector of the given vectors using graphical method. Connect the given
vectors correctly to determine the resultant vector and write your answers on the table.
Given vectors
Resultant Vector: (V1+ V2)
V1
V2
Using Polygon Method
Using Parallelogram Method
C. Draw or locate properly the following vector directions in the given Cartesian plane. Use
protractor to measure the angle.
A.
40 north of east
59 south of west
15 south of east
D.
30° west of north
D. A student runs initially at 3 m/s to the north, and suddenly accelerates at 4 m/s to the East. Find his
resultant velocity (magnitude and direction). Show all your solution.
arrow_forward
NOTE: PLEASE ANSWER THE LAST ITEMS, 7,8,9 and 10 ONLY.
arrow_forward
The catapult is used to launch a ball such that it strikes the wall of the
building at the maximum height of its trajectory. It takes 1.3 s to travel
from A to B. Suppose that s = 21 ft. (Figure 1)
Figure
3.5 ft
B
1 of 1
Part A
Determine the speed vA at which the ball was launched.
Express your answer to three significant figures and include the appropriate units.
VA = 44.9 "
Submit
✓
Part B
0=
Previous Answers
Correct
Determine the angle of release 0.
Express your answer using three significant figures.
Part C
Submit Previous Answers Request Answer
O
arrow_forward
Galileo conducted an experiment where he rolled different balls down an inclined plane. Galileo determined that each ball traveled a distance that was directly proportional to the square of the time it traveled. What did Galileo conclude from this experiment?
A. Air resistance affects all objects equally.B. All objects accelerate toward Earth at the same rate.C. Objects with greater mass accelerate toward Earth faster than less massive objects.D. The force of friction from the inclined plane causes a decrease in the acceleration of an object.
arrow_forward
1
arrow_forward
Suppose that you measure the position of a chair using a meter stick and you record the distance of the center of the seat from the wall. Which of the following measurements is the most reasonable?
A.
1.043 860 564 2 m
B.
1.043 860 m
C.
1 m
D.
1.04 m
arrow_forward
Problem 09
arrow_forward
Activities
General Directions: Write all your answers in your
activity notebook.
V.
A. Vector or Scalar
Directions: Sort the physical quantities in the box. Write the
scalar quantities under the scalar column and the vector
quantities under the vector column.
Scalar
Vector
Quantity
1. 10 m
2. 4500 calories
3. 15m/s, East
4. 36.5°C
5. 5N, downward
6. 15 kg
7. 9 mi., N of E
8. 1 Terabyte
9. 3600s
10. 1.00 kg/m3
B. Plot That Vector
Directions: Using the head to tail diagram method, plot the
following vector to find the vector sum or the resultant. Use
the scale 1cm = 5m.
Ả = 15m, 35° E of N
B = 45m, 45° Ww of N
C = 60m, S
D = 20m, 20° S of W
E = 30m, E
6.
C. Validate Your Diagram
Directions: Using the given in Activity B, find the vector sum
using the component method. Complete the table. (20 pts.)
Distance
Angle
х-соmponсnt
у-соmponent
arrow_forward
Part A
Suppose the instructions for a scavenger hunt tell you to walk 6.2 km west, 7.3 km south, 9.6 km east, then 3.4 km north. How far will this scavenger hunt take you from the starting point?
Express your answer with the appropriate units.
B. In what direction measured south from east will you end up from the starting point?
Express your answer in degrees.
arrow_forward
what is the main difference between distance and displacements. choose all that apply.
1. Displacement is a vector and distance is a scalar.
2. Displacement is calculated by how far the object travels without paying attention to the direction of travel. and distance is calculated by the change in position of the object
3. Distance is how far and displacement is how far in which direction
4. Distance is a vector and displacement is a scalar
5. Displacement is defined by magnitude and direction both but distance is defined by magnitude only
6. Displacement is calculated by calculating the change in position of the object and distance is calculated by how far the object travels without paying attention to the direction of travel.
arrow_forward
Two boxes, A and B, are connected to each end of a light vertical rope,
as shown in the following figure. A constant upward force 86.0 N is
applied to box A. Starting from rest, box B descends 12.2 m in 3.00 s.
The tension in the rope connecting the two boxes is 37.0 N (Figure 1).
Figure
1 of 1
B
arrow_forward
Remaining Time: 1 hour, 34 minutes, 39 seconds.
v Question Completion Status:
A Moving to another question will save this response.
Question 9
If the value of x-component of a vector is positive(+) and value of y-component is negative then the vector
will be in which quadirant?
O a. Vector will be in third quadrant.
O b. Vector will be in first quadrant.
O C. Vector will be in second quadrant.
d. Vector will be in 4th quadrant.
A Moving to another question will save this response.
arrow_forward
ASSESSMENT TIME!
Deriction: Solve the following problems using Polya's four-step problem-solving strategy.
1. A baseball team won two out of their last four games. In how many different orders could they have two wins and two losses in your games?
▫Understand the problem
▫Devise a plan
▫Carry out the plan
▫Review the solution
2. Determine the digit 100 places to the right of the decimal point in the decimal representation 7/24.
▫Understand the problem
▫Devise a plan
▫Carry out the plan
▫Review the solution
3. The product of the ages,in year's of three teenagers is 4590. None of the teens have the same age. What are the ages of the teenagers?
▫Understand the problem
▫Devise a plan
▫Carry out the plan
▫Review the solution
arrow_forward
B3
arrow_forward
2H
arrow_forward
An ant on a picnic table travels 3.0 x 101 cm eastward, then 25 cm northward, and finally 15 cm westward. What vector addition method will provide an accurate answer for these vectors?
a. polygon method
b. parallelogram method
c. vector addition using Pythagorean theorem
d. vector addition using the law of sines and cosines
arrow_forward
1. Galileo released two bodies of different masses from the Pisa tower to test his theory. Knowing that the height of the tower is 52 m.
A) Indicate in the image the characteristics of the movement of a body and deduce its type of movement.
B) Write the equations of motion corresponding to the movement of the body.
C) Calculate the time it takes to reach the ground.
D) How fast will they arrive? Interpret the results. 0.5p E) What speed do we carry halfway? Interpret the results.
F) With what speed should we pull up so that the body reaches the ground in 10s.
G) Selected and graphic corresponding to the previous movement. Justify your answer.
arrow_forward
5. Read the problem carefully.
Starting from her house, Karen rode her bicycle 140 m north in 2 minutes. She stopped
for 1 minute at the street corner. She then rode her bicycle another 240 m north in 4
minutes to the school. She then immediately turned around and rode her bicycle south
180 meters in 4 minutes. She arrived at her destination, the park.
• Complete the table. Show all calculations by the diagram.
• Calculate the variables for the first part of her trip from house to school.
• Calculate the variables for her entire trip from house to school to park.
Distance
(d)
Displacement
(Ax)
Avg Speed
(v avg)
Total Time
Avg Velocity
(0ave)
(0)
Home to school
Home to school
to park
School
240 m
180 m
Park
STOP
140 m
House
IVEW ORKSH AA
arrow_forward
A large wheel with a radius of 7 m completes a revolution every 16 seconds. The bottom of the wheel is 1.5 m above the ground.
a) Draw a graph showing the change in height of a person above the ground as a function of time for three revolutions, starting from the lowest point on the wheel.
b) Formulate the equation corresponding to the graph.
c) Predict the change in the graph and the equation if the Ferris wheel spins more slowly.
d) Verify the prediction you made in c) by plotting the graph for three revolutions and
revolutions and formulating the corresponding equation, if the wheel completes one revolution every 20 s. The average height of water in a harbour is 5 m. At low tide, the height of the water .
arrow_forward
1. List down three factors that would affect the human reaction time in general.
2. Explain how your reaction time would change if this experiment was conducted on the moon.
3. Explain how your reaction time would change if the mass of the ruler was doubled.
arrow_forward
Three force vectors act on an object as shown in the figure. The magnitudes of the
forces as shown in the figure are F1 = 80.0 N, F2 = 60.0 N, and F3 = 40.0 N, where N is
the standard Sl unit of force. Solve for the magnitude and direction of the resultant
force. Express the direction using standard angle measurement.
ANSWER FORMAT: space space space
Example: 10.0N 30.0 degrees
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Physics for Scientists and Engineers: Foundations...
Physics
ISBN:9781133939146
Author:Katz, Debora M.
Publisher:Cengage Learning
College Physics
Physics
ISBN:9781285737027
Author:Raymond A. Serway, Chris Vuille
Publisher:Cengage Learning
Glencoe Physics: Principles and Problems, Student...
Physics
ISBN:9780078807213
Author:Paul W. Zitzewitz
Publisher:Glencoe/McGraw-Hill
University Physics Volume 1
Physics
ISBN:9781938168277
Author:William Moebs, Samuel J. Ling, Jeff Sanny
Publisher:OpenStax - Rice University
Related Questions
- A. Fill in the table completely with the correct answer as required. Picture/Situation Magnitude Direction Scalar or Vector (if none, write NONE) 1. A boy is running at 8 m/s to the north. 2. A box has a mass of 35 kilograms. 3. The length of the table is 2.5 meters. 4. The weight of the student is 500 newtons. B. Determine the resultant vector of the given vectors using graphical method. Connect the given vectors correctly to determine the resultant vector and write your answers on the table. Given vectors Resultant Vector: (V1+ V2) V1 V2 Using Polygon Method Using Parallelogram Method C. Draw or locate properly the following vector directions in the given Cartesian plane. Use protractor to measure the angle. A. 40 north of east 59 south of west 15 south of east D. 30° west of north D. A student runs initially at 3 m/s to the north, and suddenly accelerates at 4 m/s to the East. Find his resultant velocity (magnitude and direction). Show all your solution.arrow_forwardNOTE: PLEASE ANSWER THE LAST ITEMS, 7,8,9 and 10 ONLY.arrow_forwardThe catapult is used to launch a ball such that it strikes the wall of the building at the maximum height of its trajectory. It takes 1.3 s to travel from A to B. Suppose that s = 21 ft. (Figure 1) Figure 3.5 ft B 1 of 1 Part A Determine the speed vA at which the ball was launched. Express your answer to three significant figures and include the appropriate units. VA = 44.9 " Submit ✓ Part B 0= Previous Answers Correct Determine the angle of release 0. Express your answer using three significant figures. Part C Submit Previous Answers Request Answer Oarrow_forward
- Galileo conducted an experiment where he rolled different balls down an inclined plane. Galileo determined that each ball traveled a distance that was directly proportional to the square of the time it traveled. What did Galileo conclude from this experiment? A. Air resistance affects all objects equally.B. All objects accelerate toward Earth at the same rate.C. Objects with greater mass accelerate toward Earth faster than less massive objects.D. The force of friction from the inclined plane causes a decrease in the acceleration of an object.arrow_forward1arrow_forwardSuppose that you measure the position of a chair using a meter stick and you record the distance of the center of the seat from the wall. Which of the following measurements is the most reasonable? A. 1.043 860 564 2 m B. 1.043 860 m C. 1 m D. 1.04 marrow_forward
- Problem 09arrow_forwardActivities General Directions: Write all your answers in your activity notebook. V. A. Vector or Scalar Directions: Sort the physical quantities in the box. Write the scalar quantities under the scalar column and the vector quantities under the vector column. Scalar Vector Quantity 1. 10 m 2. 4500 calories 3. 15m/s, East 4. 36.5°C 5. 5N, downward 6. 15 kg 7. 9 mi., N of E 8. 1 Terabyte 9. 3600s 10. 1.00 kg/m3 B. Plot That Vector Directions: Using the head to tail diagram method, plot the following vector to find the vector sum or the resultant. Use the scale 1cm = 5m. Ả = 15m, 35° E of N B = 45m, 45° Ww of N C = 60m, S D = 20m, 20° S of W E = 30m, E 6. C. Validate Your Diagram Directions: Using the given in Activity B, find the vector sum using the component method. Complete the table. (20 pts.) Distance Angle х-соmponсnt у-соmponentarrow_forwardPart A Suppose the instructions for a scavenger hunt tell you to walk 6.2 km west, 7.3 km south, 9.6 km east, then 3.4 km north. How far will this scavenger hunt take you from the starting point? Express your answer with the appropriate units. B. In what direction measured south from east will you end up from the starting point? Express your answer in degrees.arrow_forward
- what is the main difference between distance and displacements. choose all that apply. 1. Displacement is a vector and distance is a scalar. 2. Displacement is calculated by how far the object travels without paying attention to the direction of travel. and distance is calculated by the change in position of the object 3. Distance is how far and displacement is how far in which direction 4. Distance is a vector and displacement is a scalar 5. Displacement is defined by magnitude and direction both but distance is defined by magnitude only 6. Displacement is calculated by calculating the change in position of the object and distance is calculated by how far the object travels without paying attention to the direction of travel.arrow_forwardTwo boxes, A and B, are connected to each end of a light vertical rope, as shown in the following figure. A constant upward force 86.0 N is applied to box A. Starting from rest, box B descends 12.2 m in 3.00 s. The tension in the rope connecting the two boxes is 37.0 N (Figure 1). Figure 1 of 1 Barrow_forwardRemaining Time: 1 hour, 34 minutes, 39 seconds. v Question Completion Status: A Moving to another question will save this response. Question 9 If the value of x-component of a vector is positive(+) and value of y-component is negative then the vector will be in which quadirant? O a. Vector will be in third quadrant. O b. Vector will be in first quadrant. O C. Vector will be in second quadrant. d. Vector will be in 4th quadrant. A Moving to another question will save this response.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Physics for Scientists and Engineers: Foundations...PhysicsISBN:9781133939146Author:Katz, Debora M.Publisher:Cengage LearningCollege PhysicsPhysicsISBN:9781285737027Author:Raymond A. Serway, Chris VuillePublisher:Cengage LearningGlencoe Physics: Principles and Problems, Student...PhysicsISBN:9780078807213Author:Paul W. ZitzewitzPublisher:Glencoe/McGraw-Hill
- University Physics Volume 1PhysicsISBN:9781938168277Author:William Moebs, Samuel J. Ling, Jeff SannyPublisher:OpenStax - Rice University
Physics for Scientists and Engineers: Foundations...
Physics
ISBN:9781133939146
Author:Katz, Debora M.
Publisher:Cengage Learning
College Physics
Physics
ISBN:9781285737027
Author:Raymond A. Serway, Chris Vuille
Publisher:Cengage Learning
Glencoe Physics: Principles and Problems, Student...
Physics
ISBN:9780078807213
Author:Paul W. Zitzewitz
Publisher:Glencoe/McGraw-Hill
University Physics Volume 1
Physics
ISBN:9781938168277
Author:William Moebs, Samuel J. Ling, Jeff Sanny
Publisher:OpenStax - Rice University