1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
baherus [9]
3 years ago
9

Write Python programs to solve the following two problems. Your programs should be named according to the problem descriptions a

nd pack them into a compression file.
1. Design a class Cannonball to model a cannonball that is fired into the air. A ball has
An x- and a y-position.
An x- and a y-velocity.
Supply the following methods:
A constructor with an x-position (the y-position is initially 0)
A method move(sec) that moves the ball to the next position (First compute the distance traveled in sec seconds, using the current velocities, then update the x- and y-positions; then update the y-velocity by taking into account the gravitational acceleration of -9.81 m/sec2; the x-velocity is unchanged.)
Methods getX and getY that get the current location of the cannonball
A method shoot whose arguments are the angle alpha and the y-velocity as v*sin(alpha); then keep calling move with a time interval of 0.1 seconds until the y-position is approximately 0; call getX and getY after every move and display the position; draw a figure to show the cannonball positions and trajectory.)
Use this class in a program that prompts the user for the starting angle and the initial velocity. Then call shoot. Write the file called "CannonballDemo.py" to demonstrate your program is workable.
Computers and Technology
1 answer:
netineya [11]3 years ago
7 0

no one is gonna write this for you lol, don't know why'd you take python and not pay attention.

You might be interested in
David is working in a database that organizes student exam grade information. He needs to find all students who have scored 100
kobusy [5.1K]

Answer:

David can apply filter to the data in order to show only records that meet the criteria.

Explanation:

  • Filter is a very helpful option that displays the records that you want to view, hiding rest of the unwanted records.
  • Sometimes you want to extract and view only the records that match a specific criteria instead of viewing all the records.
  • For example in the CUSTOMERS table which contains names, addresses, countries of customers. There are several customers from different countries but you only want to view the customers from Spain. So you can use filter feature to view all the customers from country Spain.
  • In MS Access you can apply filters using Sort & Filter group in the Home tab by selecting the desired column. In SQL, WHERE clause can be used along with SELECT to for filtering and extracting certain records. SELECT will select the records from the table and WHERE clause will specify the criteria to select the certain records.
7 0
4 years ago
What does the average function do in a spreadsheet?
givi [52]
This article describes like shows the formula syntax and usage of the AVERAGE<span>  function in Microsoft Excel</span>
8 0
4 years ago
We have removed
Tanzania [10]

There were N balls but we took A balls out, so there are now N-A balls. We add B balls and now we have N-A+B balls.

The program that computes this (I will use python as language has not been specified is the following):

n, a, b = int(input()), int(input()), int(input())

print(f"There are {n-a+b} balls in the box")

# Hope this helps

8 0
3 years ago
How can e-group help in collaborating online​
tresset_1 [31]

Answer:

Collaborative learning is an e-learning approach where students are able to socially interact with other students, as well as instructors. ... Collaborative learning is based upon the principle that students can enrich their learning experiences by interacting with others and benefiting from one another's strengths.

Explanation:

inclusion of collaborative activities in an online course leads to positive student performance outcomes. Collaborative group interactions facilitate active learning, shared knowledge, and promote social interaction and a supportive eLearning community

4 0
3 years ago
The transitions between slides in a presentation are one type of powerpoint ____.
slava [35]
The transitions between slides in a presentation are one of type of power point 
Animation.
Animation is a set of effects which can be applied to objects in power point  so that they will animate in the slideshow power point.motion paths allow objects to move around the slide show.
4 0
3 years ago
Other questions:
  • Look at the data set below. {6, 7, 12, 5, 7, 11, 10, 7, 6} In this data set, what is the mode?
    9·2 answers
  • Hey! Would you please help me do this program?
    14·1 answer
  • Consider the following methods.public void modParams(int[] x, int[] y, String[] s){x[1] = 5;y = x;s[1] = new String("five");s =
    6·1 answer
  • Hoda wants to create a new presentation in PowerPoint with existing graphics and designs. What is the easiest and fastest way fo
    14·1 answer
  • John works as an associate at a construction company. His job is to draft contracts for suppliers. Before he prints the contract
    7·1 answer
  • Which of the following is an algorithm?
    15·2 answers
  • What is the purpose of the domain name system
    15·2 answers
  • A computer hardware feature that is vital to the effective operation of a multiprogramming operating system is:
    6·1 answer
  • Total_coins = 0
    7·1 answer
  • ____ takes care of the transport between machines. but it is unreliable, and there is no guarantee that any given packet will ar
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!