Python20181204

---恢复内容开始---

1.s=input('请输入你的姓名:')
print('{:*^20}'.format(‘你好’+s))
请输入姓名:luhongyagn
***你好!luhongyagn****

2.int 在强制转换的时候不会四舍五入,需要在原值的基础上+0.5

 f=7.771233                                          

In [2]: s=int(f+0.5)                                        

In [3]: print(s)                                            
8

In [4]:                                                     

3.不可以

4.b选项是非法的。

5.第一个值为3

   第二个值为True

   第三个值为0

---恢复内容结束---

原文地址:https://www.cnblogs.com/lhybky/p/10066313.html