Why is this Not Printing Anything?

Why won’t it show the answer to the float command on the print screen?
There are no answers on the print screen:

cucumbers = 100

num_people = 6 

whole_cucumbers_per_person = 100/6

print " whole_cucumbers_per_person"

float_cucumbers_per_person = 100./6
 
print"float_cucumbers_per_person"


quotient = 7./2

float = 100./6
print"float"

you print strings, not variables.

2 Likes

stetim94
What do you mean by you print strings, not variables

Hi @ianashton1480879881. In the initial code provided the print statements are follow by a string. This is clear from the use of " " speech marks around the text. For an example a single line python2 statement-

print "test"

Would just print: test
If instead you had a reference to an integer (we’ll call it x) and you wanted to print this integer value to the console-

x = 3
print x

Would print: 3
This is different than would occur if you were just printing a string

x = 3
print "x"

which would print : x

thank you for your time.