I have a simple script called cel2fer
to convert Celsius to Fahrenheit . It looks like this:
Celsius = int(raw_input("Enter a temperature in Celsius: "))
Fahrenheit = 9.0/5.0 * Celsius + 32
print Fahrenheit
To run you type cel2fer <ENTER>
in a terminal, then type a number like 10
, then <ENTER>
, then it outputs the answer. How can I modify this so you type cel2fer 10 <ENTER>
and then outputs the answer?
Basically how can I accept something as an input that goes after the script?