I am using python to work out how many children would be born in 5 years if a child was born every 7 seconds. The problem is on my last line. How do I get a variable to work
You can use string formatting to do this:
print "If there was a birth every 7 seconds, there would be: %d births" % births
or you can give print multiple arguments, and it will automatically separate them by a space:
print
print "If there was a birth every 7 seconds, there would be:", births, "births"