# -*- coding: utf-8 -*-
"""
Created on Thu Mar 19 09:10:47 2026

@author: student
"""

def get_temperature():
    print('Podaj wartosc i jednostke temperatury:')
    x=float(input('podaj wartosc'))
    y=input('podaj jednostke C-Celcious, F-Fahrenfight')
    return x,y

#get_temperature()
a,b=get_temperature()
#print(get_temperature())

def convert_to_celcious(F):
    c=5/9*(F-32)
    return c

def convert_to_fahrenfight(c):
    F=9/5*c+32
    return F

def show_temperture(value,unit):
    if unit=='F' or unit=='f':
        x=convert_to_celcious(value)
        u='celcious'
    elif unit=='C' or unit=='c':
        x=convert_to_fahrenfight(value)
        u='fahrenfight'
    else:
       # print('podales zla jednostke')
        x=None
        u='bledna jednostka'
    return x,u

t,j=show_temperture(a,b)
print('przeliczona temperatura=', t,j)
        
    
    

    
