Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions exercise/3变量/variable.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# # 练习一 变量的定义和使用
#
# 1. 定义两个变量分别为美元和汇率
# 2. 通过搜索引擎找到美元兑人民币汇率
# 3. 使用Python计算100美元兑换的人民币数量并用print( )进行输出

dollar = 100.00
exchange_rate = 6.42
rmb = dollar * exchange_rate



print("%f 美元兑换的人民币数量= %f " %(dollar,rmb))