#張佑維拷貝自 201單元
"""for x in 'Takming': #迴圈逐字元印出
print("字母: %s" % x)三引號框起註解
"""
fruits = ['台積電', '鴻海', '聯發科'] #台灣市場價值最高的三公司
for x in fruits: #
print ("公司: %s" % x)
print(fruits)
fruits.append("中華電")
print("使用append")
print(fruits)
fruits.clear()
print("使用clear")
print(fruits)
fruits = ['台積電', '鴻海', '聯發科', '中華電']
chicken = fruits.copy()
#和 chicken = fruits 有何不同?
print(chicken)
fruits.append("中華電")
print(fruits.count("中華電"))
print(fruits.count("台積電"))
for x in fruits:
print(x)
if x == "中華電": #判斷式是否banana
print('I hate 中華電.')
if x == "聯發科": #判斷式是否cherry
print('I like cherry.')
if x == "鴻海": #判斷式是否apple
print('You are my sweet apple.')
#從中我體會到只要我有耐心與興趣並堅持到最後,我也可以當一個專業的程式開發人員
張佑維利用w3school學習HTML,CSS,Borders 德 明 張 佑 維 Html上的物件,稱為元素body, p=paragraph, div=division, iframe框架 教學影片138 用w3schools編輯網頁 使用專業程式碼編輯器IDE整合開發環境 整合開發環境(Integrated Development Environment, IDE)。width霓度,height高度,src=source來源。 JAVA變數 String-字串- text, such as "Hello". String values are surrounded by double quotes int-整數- integers (whole numbers), without decimals, such as 123 or -123 F1oat-浮點數,買數- floating point numbers, with decimals, such as 19.99 or-19. 99 char-宇兀-single characters, such as'a'or'B'. Char values are surrounded by singlequotes$1i>boolean-邏輯stores values with two states: true or false
留言
張貼留言