Question
This is in Python

y =gt2 + yo with yo = 0 and g = 32 ft/s2, then we get y = 16t2 Write a program to perform the following tasks: • Create a bu
Can I have some help?
0 0
Add a comment Improve this question Transcribed image text
Answer #1
class buildHeight:
    def __init__(self):
        self.time=int(input('Enter time of Free Fall: '))
    def calculateHeight(self):
        self.height=16*self.time*self.time
    def printHeight(self):
        print("The height of building in ft is",self.height)

object1 =buildHeight()
object1.calculateHeight()
object1.printHeight()

object2=buildHeight()
object2.calculateHeight()
object2.printHeight()

object3=buildHeight()
object3.calculateHeight()
object3.printHeight()

In this problem, we will build a class with name buildHeight having 3 functions. One function is default function i.e. constructor which takes input time. The function calculateHeight calculates the height using the formula given in question. The third function prints the calculated height. We are taking 3 objects in this and input different time for all 3 objects.

Hope it helps.

Add a comment
Know the answer?
Add Answer to:
This is in Python Can I have some help? y =gt2 + yo with yo =...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A drop test is performed on a particle free-falling through air. The theoretical y-coordinate of a...

    A drop test is performed on a particle free-falling through air. The theoretical y-coordinate of a particle dropped from an initial height is ? = ?? − 0.5??2 where, y = height above the ground yi = initial height above the ground g = gravity (386.4 in/s2) t = time after particle release. Your task is to create a program that prompt user to input initial height above the ground (yi). Then call a function (that you create) to calculate...

  • I need help with this python programming exercise, please! thanks in advance Create a Python script...

    I need help with this python programming exercise, please! thanks in advance Create a Python script file called hw4.py. Add your name at the top as a comment, along with the class name and date. Both exercises should be in this file, with a comment before each of them to mark it. Ex. 1. Write a program that inputs an integer number from the user, then prints a letter "O" in ASCII art using a width of 5 and the...

  • We will build one Python application via which users can perform various analytics tasks on data...

    We will build one Python application via which users can perform various analytics tasks on data in 2-D table (similar to Spreadsheet) format which looks like: Column Name 1 Column Name 2 Column Name 3 Column Name N … … … … … In this table, each row represents the data of one object that we are interested in. Columns, on the other hand, represent the attributes of these objects. For example, this table could represent students’ academic records. Each...

  • I need help in this lab report, I am struggling, Please help, its urgent, You can...

    I need help in this lab report, I am struggling, Please help, its urgent, You can select data of your choice, like supposed data PURPOSE: To calculate the acceleration due to gravity at the Earth's surface by measurement of the total distance an object falls and the time required to fall that distance. EQUIPMENT:1 tape measure or similar device 1 table tennis (Ping-Pong) ball 1 stopwatch EQUATIONS where v is the average velocity of the object, h is the height...

  • The answers to these physics problems are from my textbook. I need help with getting to...

    The answers to these physics problems are from my textbook. I need help with getting to the answer. 1) an automobile manufacturer claims that its product will, starting from rest, travel 0.40 km in 9.00s. What is the magnitude of the constant acceleration required to do this? answer: 9.9 m/s^2 2) A stone is thrown from the top of a building with an initial velocity of 20 m/s downward. The top of the building is 60 m above the ground....

  • This is for Pycharm a python course. Can I get some help doing this and understand...

    This is for Pycharm a python course. Can I get some help doing this and understand it? ⑤ : ib tps://canvas.pasadena.edu/courses/1032754/assi a ☆ 西%N m Crowfall. Th O computing, with-c- O PHP Tutorial | SoloL ontoja. on tojav.. Write functions . def main) . def sphereVolume(r) . def sphereSurfacelr) def cylinderVolumetr. h) . def cylinderSurface(r, h) . def coneVolumefr, h) . def coneSurface(r, h) ences rations main() # call amin function at teh end In the main display, a menu...

  • I need help correcting letter; c, and d Please circle your answers PHY 121 A rock...

    I need help correcting letter; c, and d Please circle your answers PHY 121 A rock thrown from a tall building You are standing at the edge of a tall building yo meters above the ground. You throw a rock vertically upward with an initial speed of vo m/s. On the downward path the rock will fall all the way to the ground. Use g 10 m/sec. у,-150 v- 35 a) How long will t tke for the rock to...

  • PLEASE DO IN C# AND MAKE SURE I CAN COPY CODE IN VISUAL STUDIO Exercise #1:...

    PLEASE DO IN C# AND MAKE SURE I CAN COPY CODE IN VISUAL STUDIO Exercise #1: Design and implement class Rectangle to represent a rectangle object. The class defines the following attributes (variables) and methods: 1. Two Class variables of type double named height and width to represent the height and width of the rectangle. Set their default values to 1.0 in the default constructor. 2. A non-argument constructor method to create a default rectangle. 3. Another constructor method to...

  • PYTHON PROGRAMMING NEED HELP ASAP You will write an application to manage music collections -- a music collection is a l...

    PYTHON PROGRAMMING NEED HELP ASAP You will write an application to manage music collections -- a music collection is a list of albums. The named tuples used for Albums and Songs are defined below, and an example of a music collection is given. (DO NOT HARDCODE THE VALUES FOR MUSIC!) Album = namedtuple('Album', 'id artist title year songs') Song = namedtuple('Song', 'track title length play_count') MUSIC = [ Album("1", "Peter Gabriel", "Up", 2002, [Song(1, "Darkness", 411, 5), Song(2, "Growing Up",...

  • Need help with Python (BinarySearch), code will be below after my statements. Thank you. Have to...

    Need help with Python (BinarySearch), code will be below after my statements. Thank you. Have to "Add a counter to report how many searches have been done for each item searched for." Have to follow this: 1) you'll create a counter variable within the function definition, say after "the top = len(myList)-1" line and initialize it to zero. 2) Then within the while loop, say after the "middle = (bottom+top)//2" line, you'll start counting with "counter += 1" and 3)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT