<jupyter_start><jupyter_text>Program 1<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 FarenheitToCelcius(TemperatureConversion):
    
    def conversion(self):
      
      return (self._temp - 32) * 5/9

  class KelvinToCelcius(TemperatureConversion):
    
    def conversion(self):
      
      return self._temp - 273.15


  tempUnit = str(input("Enter the unit of temperature (Celsius,Fareheit,or Kelvin):"))
  
  if tempUnit == "Celsius":
    
    tempInCelsius = float(input("Enter the temperature in Celsius: "))
    
    convert = CelsiusToKelvin(tempInCelsius)
    
    print(str(convert.conversion()) + " Kelvin")
    
    convert = CelsiusToFahrenheit(tempInCelsius)
    
    print(str(convert.conversion()) + " Fahrenheit")

  elif tempUnit == "Farenheit":
    
    tempInFarenheit = float(input("Enter the temperature in Farenheit: "))
    
    convert = FarenheitToCelcius(tempInFarenheit)
    
    print(str(convert.conversion()) + " Celcius")

  elif tempUnit == "Kelvin":
    
    tempInKelvin = float(input("Enter the temperature in Kelvin: "))
    
    convert = KelvinToCelcius(tempInKelvin)
    
    print(str(convert.conversion()) + " Celcius")






 



main()<jupyter_output>Enter the unit of temperature (Celsius,Fareheit,or Kelvin):Kelvin
Enter the temperature in Kelvin: 15
-258.15 Celcius<jupyter_text>Program 2<jupyter_code>from tkinter import *

def name():
    name = entryName.get()
    Display['text'] =  name


window = Tk()
window.title('Midterm in OOP')
window.geometry("500x200")


labelName = Label(window , text= "Enter your fullname : " , width = 20, fg='red' )
labelName.place(x = 10 , y = 50)
entryName = Entry(window, width = 30)
entryName.place(x = 250 , y = 50)


Display = Label(window)
Display.place(x = 250 , y = 100)


btnAction = Button(window , text = "Click to display your Fullname" , width = 25 , fg='red', command = name)
btnAction.place(x = 10 , y = 100)

window.mainloop()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11820947414167753, 'fraction_numerical': 0.02607561929595828, 'mean_word_length': 3.359848484848485, 'pattern_counts': {'":': 3, '<': 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': '579950', 'license': 'Apache-2.0', 'n_tokens_mistral': 861, 'n_tokens_neox': 787, 'n_words': 167, 'path': 'Midterm_Exam.ipynb', 'repo_name': 'ortegamarinavitancol/OOP-58003', 'size': '2301'}