#!/usr/bin/python #coding=utf-8 #好好学习,天天向上 age=12 if age<4: price=0 elif age<18: price=40 elif age>66: price=40 else: price=20 print(f"your admmssion cost is ${price}.")
判断多条件时可用if-elif-else结构语句
原文:https://www.cnblogs.com/tigergaonotes/p/14226919.html