blogs

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

第一个Python程序

100+200
300
print("hello world")
hello world

print()会依次打印每个字符串,遇到逗号“,”会输出一个空格,因此,输出的字符串是这样拼起来的:

print('The quick brown fox', 'jumps over', 'the lazy dog')
The quick brown fox jumps over the lazy dog
print(200)
200
print(100+200)
300
print('100 + 200 = ', 100+200)
100 + 200 =  300
name=input()
michael
name
'michael'
print(name)
michael
name = input()
print('hello,',name)
zjcao
hello, zjcao
name = input("please enter your name:")
print('hello,',name)
please enter your name:frank
hello, frank