Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is in Python 3.8.1 I'm writing my own program to tell a user to enter their weight in kg to be converted to pounds.

This is in Python 3.8.1
I'm writing my own program to tell a user to enter their weight in kg to be converted to pounds.
Using kilogram=2.2 pounds
image text in transcribed
The blue highlighted is what i wrote in NotePad and the green text is what i got when I ran it in Python.
Can someone please help?
Python 3.8 52 UIU Python 3.8.1 (tars/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) (MSC V.1916 321 Type "help", "copyright", "credits" or "license" for more information. >>> k_g=input("Enter weight in kg to convert into pounds: ") Enter weight in kg to convert into pounds: k_guint >>> pounds=k_g*2.2 Traceback (most recent call last): File "", line 1, in TypeError: can't multiply sequence by non-int of type 'float' >>> answer= str(round(pounds, 2)) Traceback (most recent call last): File "", line 1, in NameError: name 'pounds' is not defined >>> print("result in pounds :", answer) k_g=input("Enter weight in kg to convert into pounds: ") k_g=int pounds=k_g*2.2 answer= str(round(pounds, 2)) print("result in pounds : ", answer)

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_2

Step: 3

blur-text-image_3

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

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions