Question: 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
This is in Python 3.8.1 I'm writing my own program to tell
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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!