diff --git a/Todo_List b/Todo_List new file mode 160000 index 0000000..65a4118 --- /dev/null +++ b/Todo_List @@ -0,0 +1 @@ +Subproject commit 65a4118897e9586de797facd20489fae1ddd1b47 diff --git a/baishali_issue_21.py b/baishali_issue_21.py new file mode 100644 index 0000000..3ca46cb --- /dev/null +++ b/baishali_issue_21.py @@ -0,0 +1,13 @@ +# temperature converter issue 21 +unit=input("Is this temperature in Celsius or Fahrenheit? (C/F): ") +temp= float(input("Enter the temperature you want to convert: ")) +if unit=="C": + converted_temp= (temp * 9/5) + 32 + print(f"{temp} degree Celsius is equal to {converted_temp} degree Fahrenheit.") + +elif unit=="F": + converted_temp= (temp - 32) * 5/9 + print(f"{temp} degree Fahrenheit is equal to {converted_temp} degree Celsius.") +else: + print("Invalid unit. Please enter 'C' for Celsius or 'F' for Fahrenheit.") + \ No newline at end of file