Skip to content

Instantly share code, notes, and snippets.

@tlehman
Created November 16, 2012 00:57
Show Gist options
  • Select an option

  • Save tlehman/4082924 to your computer and use it in GitHub Desktop.

Select an option

Save tlehman/4082924 to your computer and use it in GitHub Desktop.
Scale a number one half
import sys
input_number = sys.stdin.readline()
print(float(input_number)*0.5)
@tlehman
Copy link
Author

tlehman commented Feb 21, 2013

For this, don't use Python, use bc:

echo $INPUT_NUMBER*0.5 | bc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment