Question

For this assignment you are to implement a program that performs the following tasks jupitor notebook...

For this assignment you are to implement a program that performs the following tasks jupitor notebook python:

Part A:

  1. Outputs your name

  2. Outputs the assignment number

  3. Prompts the user to input a real (floating point) number representing the radius of a circle

  4. Outputs the area of the circle having the radius that was input in Task 3

Part B:

One acre of land is equivalent to 43,560 square feet. Write a program that asks the user to enter the total square feet in a tract of land and calculates the number of acres in the tract.

Part C:

A customer in a store is purchasing three items. Write a program that asks for the price of each item, and then displays the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 8 percent.

Part D:

Ask for total sales in dollars and the sales in dollars of a particular item A in the inventory. Calculate the % of total sales that sales of A contributed to.

Part E:

Ask for radius r and calculate the circumference of the circle.

Part F:

Ask for a number n. Calculate 1+2+3+4….+n.

Part G:

Ask the user for the principal, rate of interest, and time, and calculate the accrued amount.

Part H:
Ask for a and b axis lengths for an ellipse and calculate its area.

Homework Answers

Answer #1
Thanks for the question.


Here is the completed code for this problem. 

Comments are included, go through it, learn how things work and let me know if you have any doubts or if you need anything to change. If you are satisfied with the solution, 

please rate the answer. 

Thanks


===========================================================================

# PART A
#Outputs your name here
print("John Barak Obama") 
# Outputs the Assignment Number
print('Assignment Number Part A')
# prompt for radius
radius=float(input('Enter circle radius: '))
# Print Circle radius
import math # need to import math module to use pi value
print('Area of circle with radius:{} is :{:.2f}'.format(radius,math.pi*radius**2))


#PART B
total_sqft=float(input('Enter total square feet of land: '))
acres_equivalent=total_sqft/43560
print('Number of acres in tract is: {0:.2f}'.format(acres_equivalent))


#PART C
item_one=float(input('Enter price for item one: '))
item_two=float(input('Enter price for item two: '))
item_three=float(input('Enter price for item three: '))
total_price=item_one+item_two+item_three
sales_tax=total_price*0.08
print('Total Price: ${0:.2f}'.format(total_price))
print('Total Tax  : ${0:.2f}'.format(sales_tax))
print('Total      : ${0:.2f}'.format(sales_tax+total_price))


#PART D
total_sales = float(input('Enter total sales: '))
total_sales_A=float(input('Enter total sales for item A: '))
percentage=total_sales_A*100.0/total_sales
print('Percentage of total sales of A contributed to is :{0:.2f}%'.format(percentage))


# PART E
radius = float(input('Enter circle radius: '))
print('Circumference: {0:.2f}'.format(math.pi*radius*2))


# PART F
n = int(input('Enter a positive integer value: '))
total=0
for i in range(1,n+1):
    total+=i
print('Total sum is : {}'.format(total))


# PART G
principal = float(input('Enter principal amount: $'))
rate_of_interest=float(input('Enter rate of interest as percentage: '))
time = float(input('Enter number of years: '))

accrured_amount = principal+ principal*rate_of_interest*time/100.0
print("Accured Amount will be ${0:.2f}".format(accrured_amount))



# PART H
a = float(input('Enter length of axis ellipse: '))
b = float(input('Enter length of axis ellipse: '))

print('Area of ellipse :{0:.2f}'.format(math.pi*a*b))

thank you !

please do give thumbs up : )

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Your assignment is to implement a computer program in C++ to implement the below application. According...
Your assignment is to implement a computer program in C++ to implement the below application. According to Dummies.com the following algorithm determines the amount of paint you need to paint the walls of a four-sided room: 1. Add together the length of each wall. (For example, if each of the four walls are 14, 20, 14, 20 feet respectively then the total length is 14 + 20 + 14 + 20 = 68 feet) 2. Multiply the sum by the...
Write a Python program to calculate the area of a circle. The user needs to input...
Write a Python program to calculate the area of a circle. The user needs to input the value of the radius of the circle. area = 3.14 x radius x radius You should use a function named circlearea to perform the calculation 3. Write a Python program to calculate the area of a square. The user needs to input the value of the length of the square. area = len*len You should use a function named squarearea to perform the...
Complete the program to calculate and print the circumference and area of a circle, rounded to...
Complete the program to calculate and print the circumference and area of a circle, rounded to the nearest tenth (1 decimal place). The starter code already prompts the user and takes in the radius as a double-value input. You need to do the calculations and print the results. I recommend using the printf() command (described in chapter 3 of the book) to print the results with the correct rounding. import java.util.Scanner; class Circle { static Scanner sc = new Scanner(System.in);...
In C programming, Thank you Write a program to compute the area of a circle. You...
In C programming, Thank you Write a program to compute the area of a circle. You have to write a complete “C” program that compiles and runs in Codeblocks. Program requirements: 1. Declare the variables needed: radius (r) and area (yourLastName). 2. Calculate and print the area of each circle. 3. The program MUST prompt the user for a new radius (r) over and over until the user types -1. 5. Use the type double for all decimal numbers. 6....
By using Python code answer the following parts: A) Write a program to ask the user...
By using Python code answer the following parts: A) Write a program to ask the user to input their name and then output the type and length of the input. B) Write a program to output the last 11 letters of 'Introduction to Indiana'. C) Write a program to output the 3rd to the 11th letters of 'Introduction to Indiana'. D) Write a program to ask the user to input a float number and output the rounded value of it...
For this assignment you'll be creating an application that has the user input a subtotal, tax...
For this assignment you'll be creating an application that has the user input a subtotal, tax rate and tip percentage and then displays the sales tax, tip amount and the total. You'll use JQuery instead of the getElementByX functions AND you will display all messages on the page (no alert or prompt boxes) The starter file is based off of the Lab 2 sales_tax application. Feel free to borrow code from your lab solution but realize you will need to...
Please write C++ program. Fibonacci numbers have the property that each consecutive number is a sum...
Please write C++ program. Fibonacci numbers have the property that each consecutive number is a sum of two preceding: 0, 1, 1, 2, 3, 5, 8, 13, 21 ..... Your program should ask user for the integer, and output the result, which shows Fibonacci number at that position. For example if user enters '5', program should output '3' (fifth position in the series). Your program should use recursive function to compute and return back to the main the Fibonacci number....
For this assignment, you will be creating a simple “Magic Number” program. When your program starts,...
For this assignment, you will be creating a simple “Magic Number” program. When your program starts, it will present a welcome screen. You will ask the user for their first name and what class they are using the program for (remember that this is a string that has spaces in it), then you will print the following message: NAME, welcome to your Magic Number program. I hope it helps you with your CSCI 1410 class! Note that "NAME" and "CSCI...
Assignment #4 – Student Ranking : In this assignment you are going to write a program...
Assignment #4 – Student Ranking : In this assignment you are going to write a program that ask user number of students in a class and their names. Number of students are limited to 100 maximum. Then, it will ask for 3 test scores of each student. The program will calculate the average of test scores for each student and display with their names. Then, it will sort the averages in descending order and display the sorted list with students’...
Writ a program using java. Depending on the size of the room and the amount of...
Writ a program using java. Depending on the size of the room and the amount of shade that the room has, different sizes of air conditioning units must be used in order to be able to properly cool the room. The unit of measure for the amount of cooling that an air conditioner unit can provide is the BTU (British Thermal Unit) per hour. Code a program that will calculate the correct size of air conditioner for a specific room...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT