Question

A piece of wire is to be bent in the form of a rectangle to put...

A piece of wire is to be bent in the form of a rectangle to put around a picture frame. The length
of the picture frame is 1.5 times the width. Write a program that asks the user to enter the length
of the wire and outputs the length and width of the picture frame.

Can you do this in python, please?

Homework Answers

Answer #1

"""
  Python program for length and width calculator
"""

length = float(input('Enter length: '))
width = length/1.5
print('The length of the picture frame is:', length)
print('The width of the picture frame is:', width)

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
A thin wire is bent to form a rectangle whose straight sides are long a [m]...
A thin wire is bent to form a rectangle whose straight sides are long a [m] and 2a [m], and a current of i [A] flows through it. Calculate the modulus of the magnetic field in the center of the rectangle. (help: the magnetic field can be calculated as the sum of the contribution of each of the three straight wires)
A single loop of wire of resistance R is in the form of a rectangle of...
A single loop of wire of resistance R is in the form of a rectangle of width w and length L, and its plane is perpendicular to a uniform magnetic field of magnitude B. If the rectangular loop is turned over (that is, it is rotated 180o about one of its sides) in time Δt, how much total electric charge ΔQ will flow through any given cross-section of the wire? please help
(Use Java ) please write comment on every line I need to understand the code Problem...
(Use Java ) please write comment on every line I need to understand the code Problem Description: Write a program that prompts the user to enter a point (x, y) and checks whether the point is within the rectangle centered at (0, 0) with width 10 and height 5. For example, (2, 2) is inside the rectangle and (6, 4) is outside the rectangle, as shown in the Figure. (Hint: A point is in the rectangle if its horizontal distance...
In this assignment you will write a program that compares the relative strengths of two earthquakes,...
In this assignment you will write a program that compares the relative strengths of two earthquakes, given their magnitudes using the moment magnitude scale. Earthquakes The amount of energy released during an earthquake -- corresponding to the amount of shaking -- is measured using the "moment magnitude scale". We can compare the relative strength of two earthquakes given the magnitudes m1 and m2 using this formula: f=10^1.5(m1−m2) If m1>m2, the resulting value f tells us how many times stronger m1...
In this exercise we will practice using loops to handle collections/containers. Your job is to write...
In this exercise we will practice using loops to handle collections/containers. Your job is to write a program that asks the user to enter a sentence, then it counts and displays the occurrence of each letter. Note: your program should count the letters without regard to case. For example, A and a are counted as the same. Here is a sample run: Enter a sentence: It's a very nice day today! a: 3 times c: 1 times d: 2 times...
Create an application that calculates and displays the area of a rectangle in both square feet...
Create an application that calculates and displays the area of a rectangle in both square feet and square yards. The user will provide the rectangle’s length and width, both measured in feet. a. Prepare a Planning Chart for the application. b. Draw a sketch of an appropriate interface. Be sure to follow the GUI design guidelines covered in the chapter. The guidelines are summarized in Figure 2-20. (If you want to include an image in the interface, you can either...
Program Description A local company has requested a program to calculate the cost of different hot...
Program Description A local company has requested a program to calculate the cost of different hot tubs that it sells. Use the following instructions to code the program: File 1 - HotTubLastname.java Write a class that will hold fields for the following: The model of the hot tub The hot tub’s feature package (can be Basic or Premium) The hot tub’s length (in inches) The hot tub’s width (in inches) The hot tub’s depth (in inches) The class should also...
In c++ format please Most people know that the average human body temperature is 98.6 Fahrenheit...
In c++ format please Most people know that the average human body temperature is 98.6 Fahrenheit (F). However, body temperatures can reach extreme levels, at which point the person will likely become unconscious (or worse). Those extremes are below 86 F and above 106 F. Write a program that asks the user for a body temperature in Fahrenheit (decimals are ok). Check if that temperature is in the danger zone (for unconsciousness) or not and produce the relevant output shown...
WRITE C++ PROGRAM FOR 1,2,3,4 PARTS of question, DO ADD COOMENTS AND DISPLAY THE OUTPUT OF...
WRITE C++ PROGRAM FOR 1,2,3,4 PARTS of question, DO ADD COOMENTS AND DISPLAY THE OUTPUT OF A RUNNING COMPILER QUESTION: 1) Fibonacci sequence is a sequence in which every number after the first two is the sum of the two preceding ones. Write a C++ program that takes a number n from user and populate an array with first n Fibonacci numbers. For example: For n=10 Fibonacci Numbers: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 2): Write...
Python: Simple Banking Application Project Solution: • Input file: The program starts with reading in all...
Python: Simple Banking Application Project Solution: • Input file: The program starts with reading in all user information from a given input file. The input file contains information of a user in following order: username, first name, last name, password, account number and account balance. Information is separated with ‘|’. o username is a unique information, so no two users will have same username. Sample input file: Username eaglebank has password 123456, account number of BB12 and balance of $1000....