Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program 1: Write a Python program which accepts the radius of a circle from the user and computes the area. Hint: Area = pi *

image text in transcribed
image text in transcribed
Program 1: Write a Python program which accepts the radius of a circle from the user and computes the area. Hint: Area = pi * r **2 Sample Output: Enter the circle radius: 1.1 The area of the circle with radius 1.1 is: 3.8013271108436504 Program 2: Copy the following lines of code in top of your program: number1 = 1234567.456 number2 = 1234567.456 Write Python code that displays the value number1 variable formatted as 1,234,567.456 and the value number2 variable formatted as 1,234,567 Sample Output: 1,234,567.456 1,234,567 Program 3: Write a Python program that will ask the user to enter the amount of a purchase. The program should then compute the sales tax. Assume the sales tax is 5%. The program should display the amount of the purchase, the sales tax, and the total of the sale (which is the sum of the amount of purchase plus the sales tax). Sample Output: Enter the amount of purchase: 2000 Total purchase = 2000.0 SR Sales tax = 100.0 SR Total = 2100.0 SR Program 4: Write a python program that converts pounds to kilograms. Create a function named lbs_to_kgs that accepts a weight measurement in pounds as an argument and returns the weight measurement in kilograms. The program prompts the user to enter weight measurement in pounds then displays the result. The formula is as follows: kgs = lbs / 2.205 Sample Output: Enter the weight in pounds: 160 The weight in kilograms = 72.56 kgs Program 5: Write a Python program that will ask the user to enter two values x,y and computes the value of yxy+xy+xyx Sample Output: Enter the value of x: Enter the value of y: 5 The computed value is: 200

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions