Skip to content

jyousefpour1/conversion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

The python script challenge.py allows users to convert temperature and volume

Temperature can be converted between kelvin, celsius , fahrenheit and rankine

Volumes can be converted between liters , tablespoons , cubic-inches, cups , cubic-feet and gallons

Here's how to use the script to convert temperature:

1.python3 challenge.py

2.You wil get prompted with the following question: Do you want to convert temperature or volume?
    valid answer is: temperature
3. Next you will be prompted for the temperature type?
    Valid answers are: kelvin, celcius , fahrenheit and rankine (case sensetive)
4. Next you will be prompted for the numberical value of the temperature you'll like to convert from
5. Next you will be prompted for the temprature you'll like to convert your input to
    Valid answers are: kelvin, celcius , fahrenheit and rankine (case sensetive)
6. Next you will be prompted for the input the student had provided
    Please note the students are required to round their numbers 1 decimal place
    For example: 2.64172 is 2.6

If the student's answer was right, the returned response from the script will be "correct"

If the student's answer was not right, the returned value from the script will be "incorrect correct answer is xxx"

If the student's answer was not a numberic number, the returned value from the script will be "invalid"

Here's how to use the script to convert volume:

1.python3 challenge.py

2.You wil get prompted with the following question: Do you want to convert temperature or volume?
    valid answer is: volume
3. Next you will be prompted for the volume type?
    Valid answers are: liters , tablespoons , cubic-inches, cups , cubic-feet, and gallons (case sensetive)
4. Next you will be prompted for the numberical value of the volume you'll like to convert
5. Next you will be prompted for the volume you'll like to convert your input to
    Valid answers are: liters , tablespoons , cubic-inches, cups , cubic-feet, and gallons (case sensetive)
6. Next you will be prompted for the input the student had provided
    Please note the students are required to round their numbers 1 decimal place
    For example: 2.64172 is 2.6

If the student's answer was right, the returned response from the script will be "correct"

If the student's answer was not right, the returned value from the script will be "incorrect correct answer is xxx"

If the student's answer was not a numberic number, the returned value from the script will be "invalid"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages