CSE4IP Introduction to Programming Assignment

Assignment Help Python Programming
Reference no: EM133115130

CSE4IP Programming Assignment - La Trobe University

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:

y = (√(x - 1.0) + 1)/7 + 1*√(z +1)*4 + 1

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.

Here is a flowchart which illustrates the expected program flow:

The equation to compute the acceleration of the object, a , is given by:

a = (2*s)/t2 - 2*u/t

where s is the displacement of the object, t is the time, and u is the initial velocity.

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.

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.

Attachment:- Programming Assignment.rar

Reference no: EM133115130

Questions Cloud

Identify and outline three market segments : Identify and outline three market segments that operate in this fragmented market - resources are best spent targeting this market segment
Prepare the journal entries to record this transaction : On December 31, 2020, Extreme Fitness has adjusted balances of $830,000 in Accounts Receivable. Prepare the journal entries to record this transaction
What amount would the company report : On December 31, 2020, Extreme Fitness has adjusted balances of $860,000 in Accounts Receivable. What amount would the company report
What is the maximum amount he can borrow : Assuming Michael can borrow up to 80 percent of the market value of his home, what is the maximum amount he can borrow
CSE4IP Introduction to Programming Assignment : CSE4IP Introduction to Programming Assignment Help and Solution, La Trobe University - Assessment Writing Service
What is variable cost per unit : Each visit, including travel time, lasts one hour, on average. You are paid an average of $25 per visit. What is Variable cost per unit
Ratio analysis and time value of money : Given your understanding of cash flow, financial statements, ratio analysis and time value of money, choose a specific firm as a basis for your posts
Map the selected targets to the sdgs : Choose a company from the S&P 500 (or any company you prefer) that uses the GRI Standards. Map the selected targets to the SDGs
What is the net asset value of the fund : A mutual fund owns 500 shares of X currently trading at $ 12, and 300 shares of Y, currently trading at $ 24. The fund has 850 shares outstanding.

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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