描述
牛牛、牛妹和牛可乐正在Nowcoder学习Python语言,现在给定他们三个当中的某一个名字name,
假设输入的name为Niuniu,则输出 I am Niuniu and I am studying Python in Nowcoder!
请按以上句式输出相应的英文句子。
输入描述:
一行一个字符串表示名字。
输出描述:
假设输入的name为Niuniu,则输出I am Niuniu and I am studying Python in Nowcoder!
请按以上句式输出相应的英文句子。
f ""方法:
name = input()
print(f"I am {name} and I am studying Python in Nowcoder!")
format方法:
name=input()
print('I am {} and I am studying Python in Nowcoder!'.format(name))
%s
name = input()
print("I am %s and I am studying Python in Nowcoder!"%name)
name = input()
print('I am ' + name +' and I am studying Python in Nowcoder!')
注意raw_input() 将所有输入作为字符串看待,input( ) 只能接收“数字”的输入,在对待纯数字输入时具有自己的特性,它返回所输入的数字的类型( int, float )。