# 變數 Variable > 最後編輯日:2024.02.14 ## 概論 > "變數" 的應用近似於數學運算中運用到的 "未知數" , 它可以被賦予各式各樣的 "賦值" ,例如:數值、文字 等 ## 應用 ### 設定變數內容(數值): #### 於視窗輸入 ```x = 10``` , 再輸入 ```print( x )```  > 得到 "x" 賦值確實為 "10" #### 直接輸入 ```x``` 也可(僅 Python)  ### 設定變數內容(文字): #### 於視窗輸入 ```y = Hello``` , 再輸入 ```print( y )```  > 可在輸出時將兩個 "賦值" 同為文字的 "變數" 進行相加 >  > 而如果想在 ```Hello``` 跟 ```World```之間增加空格,則需輸入```z = " World"```,在 ``` World```前、```" "```內增加空格("空格World")
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up