[In]
print ("How old are you?"),
age=input()
print('How much is this?'),
price=input()
result=f"So,you are {age} years olds and this thing is {price} dollars"
#day3学到的字串格式化
#记住前面要f然後两边要加"{}"
result
[Out]
How old are you?
55
How much is this?
55
'So,you are 55 years olds and this thing is 55 dollars'
e.g
[In]
age=input("What is your name?")
price=input("How much is this?")
result=f"So,you are {age} years olds and this thing is {price} dollars"
#day3学到的字串格式化
#记住前面要f然後两边要加"{}"
result
[Out]
What is your name? 6
How much is this? 9
'So,you are 6 years olds and this thing is 9 dollars'
<<: ADXL335三轴加速度晶片结合Arduino nano传数据
>>: 【前端 HTML/JSX】在Input框内部加上Icon?除了使用Bootstrap、Semantic或Material-UI之外你还可以这麽做
KML (Keyhole Markup Language,锁孔标记语言) 是一种档案格式,用於存储地...
Aloha!又是我是少女人妻 Uerica!白天楼上常常会施工,钻地板跟敲打的声音总是让人难以忍受,...
Growth of a Population In a small town the populat...
需求 在早前几篇文章,我们介绍了 Recoil 这个 library 来在整个 App 分享全域变数...
六指渊参考范例:https://www.sixvfx.com/ae_combustion 今天练习烛...