<jupyter_start><jupyter_text>Special Midterm Exam in Object-Oriented Programming--- Program 1: Modify the program below by adding two conversion methods - Fahrenheit to Celsius and Kelvin to Celsius (50 points)<jupyter_code>def main():
 class TemperatureConversion:
  def __init__(self, temp=1):
   self._temp = temp
 class CelsiusToFahrenheit(TemperatureConversion):
  def conversion(self):
   return (self._temp * 9) / 5 + 32
 class CelsiusToKelvin(TemperatureConversion):
  def conversion(self):
   return self._temp + 273.15
 class FahrenheitToCelsius(TemperatureConversion):
  def conversion(self):
   return (self._temp - 32) * (5/9)
 class FahrenheitToKelvin(TemperatureConversion):
  def conversion(self):
   return ((self._temp - 32) * (5/9)) + 273.15
 class KelvinToCelsius(TemperatureConversion):
  def conversion(self):
   return self._temp  - 273.15
 class KelvinToFahrenheit(TemperatureConversion):
  def conversion(self):
   return (self._temp - 273.15) * (9/5) + 32

 tempInCelsius = float(input("Enter the temperature in Celsius: "))
 convert = CelsiusToKelvin(tempInCelsius)
 print(str(convert.conversion()) + " Kelvin")
 convert = CelsiusToFahrenheit(tempInCelsius)
 print(str(convert.conversion()) + " Fahrenheit")

 tempInFahrenheit = float(input("Enter the temperature in Fahrenheit: "))
 convert = FahrenheitToCelsius(tempInFahrenheit)
 print(str(convert.conversion()) + " Celsius")
 convert = FahrenheitToKelvin(tempInFahrenheit)
 print(str(convert.conversion()) + " Kelvin")
 
 tempInKelvin = float(input("Enter the temperature in Kelvin: "))
 convert = KelvinToCelsius(tempInKelvin)
 print(str(convert.conversion()) + " Celsius")
 convert = KelvinToFahrenheit(tempInKelvin)
 print(str(convert.conversion()) + " Fahrenheit")

main()<jupyter_output>Enter the temperature in Celsius: 30
303.15 Kelvin
86.0 Fahrenheit
Enter the temperature in Fahrenheit: 86
30.0 Celsius
303.15 Kelvin
Enter the temperature in Kelvin: 303.15
30.0 Celsius
86.0 Fahrenheit<jupyter_text>Program 2. Create a program to produce the interface. Click the button to change its background to yellow. (Hint: See the figures.  - 50 points)<jupyter_code>import tkinter as tk

class Test():
    def __init__(self):
        self.root = tk.Tk()
        self.root.geometry("250x100")


        self.button = tk.Button(self.root,
                                text="Click to change color",
                                command=self.changeColor)

        self.button.pack(side=tk.TOP)
        self.root.mainloop()

    def changeColor(self):
        self.button["bg"]="yellow"
        self.button["fg"]="black"

app=Test()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11232980332829047, 'fraction_numerical': 0.030257186081694403, 'mean_word_length': 4.30060120240481, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '383606', 'license': 'Apache-2.0', 'n_tokens_mistral': 922, 'n_tokens_neox': 846, 'n_words': 202, 'path': 'Special_Midterm_Exam_in_Object_Oriented_Programming_Requillas.ipynb', 'repo_name': 'Kiel-Shui/OOP-58003', 'size': '2644'}