I need to write:

Starting weight of food (in lbs:ozs)=8:9

into a python 3.0, I'm very new to this and what I came up with was:

Starting_weight_of_food_in_lbs{:}ozs=input("Enter Starting_weight_of_food_in_lbs{:}ozs")
print("Starting_weight_of_food_in_lbs{:}ozs entered=", Starting_weight_of_food_in_lbs{:}ozs)

and I belive i'm way off....any help would be great!

First, try running this code in Idle. It will tell you that there are problems with this statement with a variable name that contains special characters.
Starting_weight_of_food_in_lbs{:}ozs=input("Enter Starting_weight_of_food_in_lbs{:}ozs")

Take a look here for getting started with Idle http://www.ai.uga.edu/mc/idle/index.html

Hot damn, why such and odd Variable name? Just name it weight or something simple, I'm pretty sure you can't use "{" or "}" in a variable name.

yeah... this really looks weird !?

is this what you mean?

startingWeight = input( "Enter starting weight in lbs: " )
print( "Starting weight of food in lbs entered is", startingWeight )

Not sure whether you want to use a dictionary or not for this :)

Edited 7 Years Ago by masterofpuppets: n/a

This question has already been answered. Start a new discussion instead.