Skip to content

Instantly share code, notes, and snippets.

@Toyz
Last active August 29, 2015 14:10
Show Gist options
  • Save Toyz/b55dfc306b27bfcf9fef to your computer and use it in GitHub Desktop.
Save Toyz/b55dfc306b27bfcf9fef to your computer and use it in GitHub Desktop.
Distance in python
def formula(s, t):
return s * t
def main():
speed = raw_input("Enter Speed Traveled At: ")
time = raw_input("Enter Time Traveled for: ")
output = formula(int(speed), int(time))
print "Distance: " + str(output)
print "Speed: " + str(speed)
print "Time: " + str(output)
main()
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment