python :高级编程技术 week1-3
程序员文章站
2022-10-16 19:24:40
编程技术-week1-3">python 从入门到实践 第二章 (高级编程技术 week1-3)
现在先做一下课后的习题
2-1
a='message'...
编程技术-week1-3">python 从入门到实践 第二章 (高级编程技术 week1-3)
现在先做一下课后的习题
2-1
a='message' print(a)
2-2
a = 'old message' print(a) a = 'new message' print(a)
2-3
a = input('What's your name : ') print('Hello ',a,' would you like to learn some Python today')
2-4
name = input('What's your name : ') print(name.upper()) print(name.lower()) print(name.title())
2-5
print('Albert Einstein once said, “A person who never made a mistake never tried anything new.” ')
2-6
famous_persion = 'Albert Einstein' message = famous_person + ' once said, “A person who never made a mistake never tried anything new.” ' print(message)
2-7
name = ' \n\t\n John \n\t\n ' print(name) print(name.lstrip()) print(name.rstrip()) print(name.strop())
2-8
print(3+5) print(10-2) print(2*4) print(16/2)
2-9
my_favourite_number = 6 message = "my favourite number is " + str(my_favourite_number) print(message)
2-10
my_favourite_number = 6 # 好像没有什么注释要加的 message = "my favourite number is " + str(my_favourite_number) print(message)
2-11
看了一下python之禅。
上一篇: 谷歌利用深度学习提高机器翻译准确度
下一篇: 那椰奶怎么来个笑话
推荐阅读
-
49式!Python初级到高级招式都全了
-
python 循环高级用法 [expression for x in X [if condition] for y in Y [if condition] ... for n in N [if con
-
Python 正则表达式的高级用法
-
Python3网络爬虫中的requests高级用法详解
-
Python中的迭代器与生成器高级用法解析
-
Python3网络爬虫中的requests高级用法详解
-
Python中的迭代器与生成器高级用法解析
-
Python进阶之全面解读高级特性之切片
-
Python的几个高级语法概念浅析(lambda表达式闭包装饰器)
-
python re模块的高级用法详解