Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Days Finder In A Month #451

Merged
merged 17 commits into from Jun 25, 2021
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions BasicPythonScripts/Temperature_conveter/temperature_converter.py
@@ -0,0 +1,33 @@
def Cel():
celsius = float(input("Enter the temperature in Celsius ")) # It will take user input
fahrenheit :float = (celsius * 9 / 5) + 32 # calculation part
print("Value in Fahrenheit ", fahrenheit)


def Far():
fahrenheit = float(input("Enter the temperature in Fahrenheit ")) # It will take user input
celsius :float = (fahrenheit - 32) * 5 / 9 # calculation part
print(" Value in Celsius", celsius)

def condition():
cont=int(input((" Enter 1 to continue or else to exit ")))
if cont ==1:
main()
condition()

def main():
print(" To convert Temperatures")
choice=int(input("Enter 1 to convert Celsius to Fahrenheit 0r Enter 2 for vice versa "))

if choice ==1 :
Cel()

elif choice ==2 :
Far()
else :
print(' Wrong choice ')
return

main()
condition()