Write a program to calculate the trajectory of a cannon ball

Assignment Help Basic Computer Science
Reference no: EM13853450

Write a program to calculate the trajectory of a cannon ball (we use a watermelon). The program must ask the user for the initial velocity and initial trajectory angle then ask the user what they want to calculate, Time of flight or Max. height or horizontal range. Calculate what user wants and display it.

Formulas:

User input:

The initial velocity valid rage is 10 to 1000 m/s

The initial angle valid range is 1 to 89 degrees

Requirement

Must implement functions for each of the followings:

1. Calculating peak height. Must not print the result in the function

2. Calculating max range. Must not print the result in the function

3. Calculating travel time. Must not print the result in the function

4. Check for valid input from the user and give the user chance to reenter the data 3 times, after 3 incorrect tries give user a notice and exit the program. You can do some print statements in this function depending on how you design your code

Reference no: EM13853450

Questions Cloud

The initial hypothesis supported or refuted? explain. : Was the initial hypothesis supported or refuted? Explain.
Write about online gaming prototypes : Write about online gaming prototypes that can be used and types of online ventures that may be profitable and how it will help and grow Wire's online business ventures. The paper need to be written in a fashion in which it addresses the company v..
Rental rate of capital and marginal productivity of labor : According to The Wall Street Journal, Mitsubishi Motors recently announced a major restructuring plan in an attempt to reverse declining global sales. Suppose that as part of the restructuring plan Mitsubishi conducts an analysis of how labor and cap..
Draw the isoquants for this production function : The production function at Ginko's Copy Shop is q = 1000 x min(L, 3K), where q is the number of copies per hour, L is the number of workers, and K is the number of copy machines. As an example, if L = 4 and K = 1, then the minimum of L and 3K, min(L,..
Write a program to calculate the trajectory of a cannon ball : Write a program to calculate the trajectory of a cannon ball (we use a watermelon). The program must ask the user for the initial velocity and initial trajectory angle then ask the user what they want to calculate
Trusted computer system evaluation criteria : How well did the Common Criteria (CC) address these four problems of TCSEC - relevance and correctness of content, clarity and logical flow, spelling, grammar, and proper citations/bibliography.
Using an annualized equivalent cost analysis : Machine A costs $20,000, lasts 3 years and has a salvage value S of $3,000. Machine B costs $12,000, lasts 2 years and has a salvage value of $2,000. The machines can be purchased at the same price with the same salvage value in the future, and are n..
How much the workers in risker job should should get paid : Farm workers in Oaks Farmville face a 1/198 probability of death at work and each of them receives a yearly wage of $61,000. Farm workers in Valley Farm face a 1/54 of death at work. Assume that both kinds of job require the same level of skills, eff..
Which immunological process is impaired in jeremiah? : Which immunological process is impaired in Jeremiah? Which is the gene/s that could be implicated in this deficiency?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd