Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Todo_List
Submodule Todo_List added at 65a411
13 changes: 13 additions & 0 deletions baishali_issue_21.py
Original file line number Diff line number Diff line change
@@ -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.")