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

  Explain what is done to prevent wayward system administrator

Explain what can be done to prevent wayward system administrators from simply looking up user passwords in host machine password file?

  Create an array of numbers filled by the random number

Create an array of numbers filled by the random number generator. Determine the smallest, largest, average, and calculate the standard deviation. Allow the client to pick the size of the array to be used and allow the client to repeat the process ..

  How many rows will truth table require if there six variable

How many rows will a Truth Table require if there are six variables and three conditions of each variable? Defend your answer.

  Windows media right management

"Windows Media Right Management"  Please respond to the following:From the e-Activity, take a position on whether the Windows Media Right Management (DRM) is similar to the Public Key Infrastructure (PKI) as read in Lesson 6.

  Discuss the impact of the roles on health care organization

Discuss the impact of the roles on the health care organizations. Create a diagram with the career choice as the focal point and identifying the work roles within one of the services or product you identify.

  Browser immediately checks data is correct. true or false

When a user enters data into a form then submits the form (typically, by clicking the Submit button), the browser immediately checks that the data is correct. True or False

  Demonstrate an understanding of existing strategic impact

Demonstrate an understanding of existing and emerging information technologies and strategic impact on organizational operations. Explain how to develop reasoned responses to the major forces shaping the role of IT in organizations competing in a ..

  Consider a demand-paging system

Consider a demand-paging system with the following time-measured utilizations.

  Cmpute cpi and mips rating for processor

Determine the average CPI? On 500MHz Pentium III program takes 1 second. Compute MIPS rating for this processor? What is CPI?

  Describes the typical computer in 2001

Describes the "typical computer in 2001" as 1.5GHz processor, 100 Mb main memory and 40 Gb disk. (and in 2nd ed.) the "typical computer in 2008" as 2 processors of 3GHz , 1 Gb main memory and 250 Gb disk. Moore's law says that these numbers double..

  Find the average case complexity of sequential search

Find the average case complexity of sequential search in an array if the probability of accessing the last cell equals 1/2, the probability of the next to the last cell equals 1/4 .

  Part of your first project

On completion of this course you are hired by the company Tickets R Us. Part of your first project is to develop an application to assist with the selling of tickets. After discussing with your client

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