计算a+b

要求:同一行输入两整数,用空格隔开。计算两数和,输出!

#! /usr/bin/env \python
# -*- coding: utf8-*-
a=raw_input("请输入两个整数,并用空格隔开:").split(" ")
c=int(a[0])+int(a[1])
print '%(x)s+%(y)s=%(z)d'%{'x':a[0],'y':a[1],'z':c}  

Published by 阿飞 on
Tags: python

暂无评论