Python function creation

Create a simple function
Insert picture description here

#-*-coding:utf-8-*-
# !/usr/bin/env python
def fahrenheit_converter(C) :
    farenheit=C*5/9+32
    return str(farenheit)+'F'
#str可以将数字转化为字符串,精度为小数点后

lyric_length=len('I Cry Out For Magic!')
print(lyric_length)
C2F=fahrenheit_converter(35)
print(C2F)

Guess you like

Origin blog.csdn.net/ZXG20000/article/details/106576668