Commit eb72e86d by BellCodeEditor

save project

parent 5aab51be
Showing with 3 additions and 32 deletions
h=float(input("SB输入身高:"))
w=float(input("SB输入体重:"))
bmi=w/(h*h)
if bmi>=28:
print("肥胖")
elif bmi<=18.4:
print("偏瘦")
elif bmi>=18.5 and bmi<=23.9:
print("正常")
elif bmi>=24.0 and bmi<=27.9:
print("过重")
name=input("请输入你的姓名")
print(name+"你滚")
\ No newline at end of file
class Dog: # 狗类
def __init__(self):
self.footNum = 4 # 腿
self.eyeNum = 2 # 眼睛
self.head = 1 # 头
self.earsNum = 2 # 耳朵
self.skin = "white"
def run(self):
print("狗狗飞快的跑起来")
class Husky(Dog): # 哈士奇类
def __init__(self):
super().__init__()
self.skin = 'blue'
coco = Husky()
print(coco.skin)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment