直接以代码来描述学习内容
print('Please enter your robot name')
myName = input()
print('nice to meet you,'+ myName)
s = 'hello,'+ myName +'\nmy name is jingling,nice to see you!'
print(s)
print(len(s))
print(str(29))
print(int('25'))
print(float('3.141926') + float('10'))
示例:
输入:xiaobing
输出:
语句分析:
print() 输出函数,input() 输入函数,len() 统计字符串中字符的个数的函数,str() 强转为字符串的函数,int() 强转为整型类型的函数,float() 强转为实型类型的函数
print('Please enter your robot name')
myName = input()
str(29)
int('25')
float('10')