"""练习 20 进阶版:用 map 转换输入,并将关系与逻辑表达式作为值输出。""" import keyword candidate = input().strip() a, b = map(int, input().split()) x, y = map(float, input().split()) valid_identifier = candidate.isidentifier() and not keyword.iskeyword(candidate) print("identifier valid:", valid_identifier) print("is keyword:", keyword.iskeyword(candidate)) print("types:", type(candidate).__name__, type(a).__name__, type(x).__name__) print("boolean type:", type(valid_identifier).__name__) print("integer arithmetic:", a + b, a - b, a * b, a ** 2) if b: print("integer division:", a / b, a // b, a % b) else: print("integer division: undefined when b is 0") print("real arithmetic:", x + y, x - y, x * y) print("real division:", x / y if y else "undefined when y is 0") print("relations:", a == b, a != b, a < b, a <= b, a > b, a >= b) print("logical:", a > 0 and b > 0, a > 0 or b > 0, not (a == b))