python10——选择大学的决策树
作者:互联网
题目:
代码:
# -*- coding: utf-8 -*-
judge_a = input('你在意宿舍有空调么?(是or否)\n')
judge_c = input('你在意女生的数量么?(是or否)\n')
if judge_a == '是':
if judge_c == '是':
print('\n复旦大学')
else:
print('\n清华大学')
else:
if judge_c == '是':
print('\n北京大学')
else:
print('\n上海交通大学')
note:
* if判断语句
标签:python10,print,coding,else,大学,在意,judge,input,决策树 来源: https://blog.csdn.net/weixin_59633391/article/details/120317976