Computes the value of acceleration of object

Assignment Help Python Programming
Reference no: EM133122702

CSE4IP Introduction to Programming - La Trobe University

Programming Assignment

Programming Tasks

Take your time to read and re-read the instructions before attempting to write your solution---you can save a lot of trouble by simply having a clear understanding of the problem before touching any code.

Task 1
For this task, you are to write code for the following numerical expression.

Instructions
Write a simple Python program which asks the user to input a value for x and z , and then prints the result of the following mathematical expression:

Requirements
You must keep the calculation as a single expression on a single line in your final solution.
You must not rearrange or simplify the expression in any way.
You should parentheses in code so that it is evaluated in the same way as the mathematical expression described above.
You must not use any conpcets not covred yet

Task 2
For this task, you are to write code that computes the value of acceleration of object, given the values of displacement, time, and initial velocity.

Instructions
Your program should ask for user inputs to get the values of displacement (how much distance the object has travelled), time, and the initial velocity of the object. It should then calculate the acceleration of the object and print this value out.

Requirements
To achieve full marks for this task, you must follow the instructions above when writing your solution. Additionally, your solution must adhere to the following requirements:

Appropriate data types must be used for all user inputs.
The output must be printed with the value between the description and the unit of measurement, as shown in the example runs.

Task 3
For this task, you are to write code that determines whether a person is eligible to participate in a clinical trial.

Instructions
Your program should ask the user for a few details:

The weight of the person (in kilograms)
The height of the person (in meters)
Whether the person is over 18 years of age.
Your program should then calculate the body mass index (BMI) of the person. Finally, your program should output whether the person is eligible to participate in the clinical trial. A flowchart has been provided which outlines the program flow. Use this in conjuction with the text description to code the solution.

Notice that the flowchart contains a decision element which checks whether the person is eligible. We will consider a person to be eligible for the trial if both of the following two conditions are met:

The person has a BMI value greater than or equal to 20.
The person is older than 18 years.
Your solution should make appropriate use of a single complex boolean expression encompassing both the above conditions. If done correctly you will only need one if/else structure in your solution (corresponding to the one decision element in the flowchart).

Hint: Think about how to combine multiple conditions using a logical operator.

Requirements
To achieve full marks for this task, you must follow the instructions above when writing your solution. Additionally, your solution must adhere to the following requirements:

Appropriate data types must be used for all user inputs.
The calculate_body_mass_index function must be used exactly once in your solution.
The MIN_BMI constant must be used in your solution.
The decision element in the flowchart must be implemented in a single complex boolean expression encompassing both eligibility conditions.

Task 4
For this task, you are to write a function and for-loops that outputs the shape like the one below. Allow the user to specify how high the shape should be.

Instructions
Your function should take one argument: the height of the shape and then print the shape based on the value of the height

Requirements
To achieve full marks for this task, you must follow the instructions above when writing your solution. Additionally, your solution must adhere to the following requirements:

You must implement the for-loops and print inside the function.
Appropriate data types must be used for all user inputs.
Your solution must not add any more lines of code outside the function implementation.

Task 5
For this task, you are to write code that calculates the maximum yearly income tax given by an individual within a period of multiple years.

Instructions
Your program should first ask the user to input a number of years. The program should then repeatedly ask the user to input a yearly tax amount until the specified number of years is reached. Finally, the program should output the maximum yearly income tax of the user based on the input values.

Hint: consider which form of aggregation might be appropriate for solving this problem.

If the user inputs zero for the number of years, the program should output a friendly message informing the user that maximum tax could not be calculated.

Requirements
To achieve full marks for this task, you must follow the instructions above when writing your solution. Additionally, your solution must adhere to the following requirements:

You must choose appropriate data types for user input.
Your solution must not crash if the user inputs zero for the number of years.
Your solution must be implemented using a for loop on a range.
You must indicate which year the input is for as part of your income tax prompt (see example runs).

Task 6
For this task, you are to write a function that takes two strings as inputs and then print how many matches there are between them. A match is where the two strings have the same character at the same index. For example, ‘Melbourne' and ‘Mildura' match in the first and third characters so the function should print 2. 'Python' and 'Path', match in the first, third, and fourth characters, the function should print 3.

Instructions
You program should first ask the user to input two different strings. If you entered the same strings, the program should ask the user to re-enter two different strings.

Requirements
To achieve full marks for this task, you must follow the instructions above when writing your solution.

Attachment:- Programming Assignment.rar

Reference no: EM133122702

Questions Cloud

Determine the scope of work : In the eight steps in the appraisal process, the second step is to determine the scope of work.
What does right really mean : What does "right" really mean? How do you know when something is truly right or wrong?
About memorable experience working with team : Write a description about a memorable experience working with a team.
What is the expected increase : Gertrude had total revenue of $4,000mm in Year 0, and revenue is expected to increase by $480mm in Year 1, to $4,480mm. What is the expected increase
Computes the value of acceleration of object : Computes the value of acceleration of object, given the values of displacement, time, and initial velocity - determines whether a person is eligible
Human services job : If you were applying for a human services job and were asked, "What are the most important goals you have for your clients?" how would you respond?
List down the three types of investment you chose : Assume you have P900,000.00 and you want to invest your money into three types of investment. List down the three types of investment you chose
How much is the commission expense recognized : As of December 31, 2020, the company paid a total of P1,800,000 and the total expense is P2300000. How much is the commission expense recognized
What are the potential tax implications : What are the potential tax Implications when an Investor decides to automatically reinvest fund distributions Into additional non-registered fund units?

Reviews

Write a Review

Python Programming Questions & Answers

  Write a simple budget python program using techniques

Programming Task - Write a simple budget Python program using techniques discussed in class - making the experience seem like that of a standard command

  Design the appropriate accessor and mutator methods

he day shift is shift 1 and the night shift is shift 2. Design the appropriate accessor and mutator methods for each class.

  Conduct a research or development project

Evaluate the research or development project and identify areas for further work and Evaluate alternative approaches appropriate to a defined problem

  Calculate the amount of county sales tax

A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and county sales tax collected.

  Create an html page named index that contains links to each

Given a folder with at least five 5 images in it, create an HTML page named index that contains links to each JPEG file in the directory.

  Define a word as ending a sentence

Define a word as ending a sentence if that word is immediately followed by a period. A startwords function that takes a single string argument.

  Write a class named employee

Write a class named Employee that holds the following data about an employee in attributes: name, ID number, department, and job title

  Create a count-controlled while loop to generate

Create a count-controlled while loop to generate and append 1,000 random integers to the list. Each integer should be between 1 and 100, including 1 and 100.

  Generate a new sorted list by iteratively adding correct num

Generate a new, sorted list by iteratively adding the correct number of repetitions of each unique value in the correct order. This can be done in O(n) time.

  Find the time when the concentration will return back

Suppose a reactor normally contains 12 units of dissolved oxygen in a fixed volume of water. Suppose at t=0(min) a quantity of organic waste is introduced.

  Implement the insertion sort algorithm in python

Implement the insertion sort algorithm in python - Compare the time for these implementations for the following cases. The code for recording the runtime

  Write a python program that prompts for an integer

Write a Python program that prompts for an integer-let's call it X-and then ands the sum of X consecutive integers starting at 1.

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