# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     name: python3
# ---

# + [markdown] id="view-in-github" colab_type="text"
# <a href="https://colab.research.google.com/github/Matthew-Ilustre/OOP-58002/blob/main/Long_Quiz_1_58002.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>

# + [markdown] id="cG7KzhqVmpbD"
# Long Quiz 1

# + id="HK7XJjrAojZF" outputId="855a9c45-86b7-4513-9737-a0962e6c7add" colab={"base_uri": "https://localhost:8080/"}
class Temp:
  def _init_ (T):
    self.T = T
  
  def Celsius(self):
    return((9/5)*T)+32

  def Fahrenheit(self):
    return(5/9)*(T-32)

  def display(self):
    if convert =='c':
      print(T, "Celsius is", self.Celsius(), "Farenheit")
    elif convert == 'f':
      print(T, "Fahrenheit equals", self.Fahrenheit(), "Celsius")
    elif convert =='C':
      print(T, "Celsius is", self.Celsius(), "Farenheit")
    elif convert == 'F':
      print(T, "Fahrenheit equals", self.Fahrenheit(), "Celsius")
    else:
      print("The Input was Invalid please try again.")
      
T= float(input("What is the current Temperature:"))

convert=input("Is the provided data Celsius or Farenheit C/F ")


View = Temp()
View.display()

StarcoderdataJupyterScriptsDedupFiltered