Programming Homework Help

Programming Homework Help. University of Nairobi Simulating Gravity and Projectile Motion Project

The program requires me to do two things:

  • Add more player control to the game by allowing the player to change the angle of their shot. This reflects the original tennis for two, where each player’s controller was a knob to represent the angle of the shot, and a button. The angle of a player’s paddle should control how much force is applied in the x and y directions.
  • Add more player control to the game by allowing each player to hit the ball harder or softer. There are a few ways to handle this, you can have different keys for “soft hit” and “hard hit” or you can have some keys that control power up and power down.

First, we already have the code(As shown below) which simulates projectile motion, which has a ball class that includes init method(which sets the shape and initial position and velocity), move method(which sets how it moves) and hit method(which prints “hit”, reverses velocity and set velocity to 15) and a Game class which randomly set the position of the ball and run the game. We draw the motion of the ball using turtleimport turtle

import random

import math

class Ball(turtle.Turtle):

def __init__(self, px, py, vx, vy):

turtle.Turtle.__init__(self)

self.setpos(px, py)

self.vx = vx

self.vy = vy

self.shape(‘circle’)

self.turtlesize(0.3)

self.penup()

self.setpos(px, py)

self.bounce = 0

turtle.update()

def move(self):

self.vy = self.vy – 0.981

new_px = self.xcor() + self.vx

new_py = self.ycor() + self.vy

if new_py <= 0:

new_py = 0.75 * self.ycor()

self.vy = -0.75 * self.vy

self.bounce = self.bounce + 1

if self.xcor() < 0 and new_px > 0:

self.bounce = 0

if self.xcor() > 0 and new_px < 0:

self.bounce = 0

if self.bounce == 0 or self.bounce == 1:

self.setpos(new_px, new_py)

else:

self.bounce = 0

self.reset()

px = new_px

py = new_py

turtle.update()

def hit(self):

self.vx = -1 * vx

self.vy = 15

def reset(self):

px = random.uniform(-100, 100)

py = random.uniform(30, 100)

self.vx = random.choice([random.uniform(-12, -6), random.uniform(6, 12)])

self.vy = random.uniform(4, 10)

self.setpos(px, py)

turtle.update()

class Game:

def __init__(self):

t = turtle.Turtle()

t.penup()

turtle.setworldcoordinates(-500, -500, 500, 500)

t = turtle.Turtle()

t.penup()

t.setpos(-400, 0)

t.pendown()

t.goto(400, 0)

t.penup()

t.setpos(0, 0)

t.left(90)

t.pendown()

t.forward(30)

turtle.delay(0)

turtle.tracer(0,0)

px = random.uniform(-100, 100)

py = random.uniform(30, 100)

vx = random.choice([random.uniform(-12, -6), random.uniform(6, 12)])

vy = random.uniform(4, 10)

self.ball = Ball(px, py, vx, vy)

turtle.update()

self.gameloop()

turtle.onkeypress(self.ball.hit, “space”)

turtle.listen()

turtle.mainloop()

def gameloop(self):

if self.ball.xcor() == 0 and self.ball.ycor() < 30:

self.ball.reset()

self.ball.move()

turtle.ontimer(self.gameloop, 30)

turtle.update()

def main():

Game()

if __name__ == ‘__main__’:

main()

Programming Homework Help

Programming Homework Help

Programming Homework Help. ENTD 220 APUS Week 8 Python Program Project

This week you will write a program to read and write from a file.

  1. Copy the following text to a text file (not Word!) and save it as Authors.csv to the file where your .py files are located.

    AuthorID,FirstName,LastName,Country

14,Alysha,Thompson,Canada

18,David,Wright,Canada

6,Dylan,Garcia,Spain

3,Elena,Martin,Mexico

16,Emily,Clark,USA

23,Emily,Murphy,USA

9,Fabian,Wilson,USA

20,Helena,Adams,Canada

7,Ian,Cruz,Mexico

15,Isabella,Lee,Canada

17,John,Young,China

22,Liam,Parker,Canada

10,Liam,Taylor,Canada

12,Logan,Moore,Canada

8,Lucas,Smith,USA

  1. Create a menu using a list to display to the user
    1. “1) Read File; 2) Update the File; 3) Quit
    2. Incorporate looping! Go back to main menu (using the continue y/n features you have added in previous weeks)
  2. create a class wrfile() with two methods to write the results to a file, and to read the results from a file.
    1. Based on user input, call the correct function
  3. When displaying results:
    1. Read one line at a time (hint, use import csv functions!)
    2. Use the translate() string method to get rid of the quotes and brackets in the output
    3. Be sure to close the file when done loading for display
  4. When updating the file:
    1. Update the file by adding some more authors. You can hard-code this and add multiple lines via list. E.g., two more authors are added in this statement:
    2. [[99, “James”, “Joyce”, “UK”], [100, “Ann”, “Cleeves”, “UK”]]
    3. Add more records than these sample ones, please.
    4. Show the file has updated.
    5. Close the file!

Programming Homework Help

Programming Homework Help

Programming Homework Help. BA 500 CU Net Developers in Business Operations Essay

ACC 601 Managerial Accounting

BA 601 Marketing Management

BA 611 Organization Theory

BA 602 Management Information Systems

BA 614 Human Resource Management

BA 616 Business Ethics

BA 620 Managerial Finance

BA 690 Business Strategy

ECO 610 Managerial Economics

Explain the Above courses how directly related to my development as a .Net developer. Explain clearly in deatils

Programming Homework Help

Programming Homework Help

Programming Homework Help. CSIS 208 Lincoln University Programming Expenses Cost App Design

Programming Assignment 6 Instructions

You have been tasked to write an application which will help your organization calculate the cost of your expenses. Write a Visual Basic program to implement the budget application in the diagram below. The program should have a class called BudgetReceipts that keeps track of the balance and provides the ability to add to the income and subtract to the expenses.

Requirements:

  • Form Setup
    • You must save your project using your initials in the name**This is required and the project will not be accepted otherwise.
    • Design your screen to look like the one below.
    • The background image of the form will be set to an appropriate image of your choice.
    • Use appropriate naming conventions for controls and variables.
    • Include access keys for all buttons.
    • The user will not be directed to the net balance field.
    • The balance text box will be read only.
    • Lock all controls.
    • All values must be formatted in currency
    • On the form load, the user is prompted with an input box to enter the starting balance for the balance sheet.The user is prompted until a value is entered.
    • The initial balance is saved by the class.
  • Class
    • A class is created which uses a get property for the balance, a sub that subtracts the expenses, and sub that controls the income.
    • The class is created separate from the class form.
    • The property balance will be called to display the balance each time
    • The income sub will be used to add to the income
    • The expenses sub will be used to subtract the expenses
  • Income Button
    • When the Income button is selected the application verifies a value is entered in the amount text box.
    • The income button prompts the user for the description of the income the amount is for.
    • If a value is not entered the application presents and error and the program does not continue.
    • The program will call the class to add the value to the balance and then display the total balance to the user using the appropriate property.
    • The income button presents the user with a description of the value and the value amount
    • The textbox amount is cleared.
  • Expense Button
    • When the expense button is selected the application verifies a value is entered in the amount text box.
    • If a value is not entered the application presents and error and the program does not continue.
    • The program will call the class to subtract the value to the balance and then display the balance to the user using the appropriate property.
    • If the balance will go negative the user will be prompted with a message box but the program will continue.
    • The income button presents the user with a description of the value and the value amount
    • The textbox amount is cleared

Programming Homework Help

Programming Homework Help

Programming Homework Help. COMP 348 Concordia University Lisp Ruby and Prolog Codes

I need someone that is fairly proficient at lisp, ruby, and prolog. But I understand if you are not good at one if you are at least good at two of those that work too. If you are a good coder this is very easy money cause there is no coding just multiple choice. I need someone available today at 2pm EST (NYC time)

Programming Homework Help

Programming Homework Help

Programming Homework Help. CSCI 117 Hudson County Calculation of the Gross Average of All Employees Project

1)use the attached program.

2) modify it using methods.

3)ONLY ONE TASK PER METHOD

NO activities in the main method beside call statements, declaration, switch, loops

I copied the code and pasted it to word document just copy it and paste it to jGrasp


Programming Homework Help

Programming Homework Help

Programming Homework Help. PSUPSMC Threads Synchronization and Shared Memory Paper

This is an extensive programming projects that includes many techniques and skills. Please review the instructions thoroughly before proceeding. I have attached instructions and a helpful flowchart of how the program should run. I also have coding tips at my dsiposal if you should need them. Please write the code in C, and test accordingly. If you have any questions please do not hesitate to ask me.

Programming Homework Help