【 CSS 】 基本語法
3:43
Жыл бұрын
【 CSS 】 字體 font
7:20
Жыл бұрын
【 CSS 】 元素選擇器
1:58
Жыл бұрын
【 CSS 】 盒模型 Box Model
3:55
【 CSS 】 屬性選擇器
3:57
Жыл бұрын
【 HTML 】 跳脫字元
2:46
Жыл бұрын
【 CSS 】 CSS中的陰影
3:16
Жыл бұрын
【 HTML 】 div span
2:43
Жыл бұрын
【 HTML 】 超鏈結
3:05
Жыл бұрын
【 CSS 】 CSS中的權重
8:40
Жыл бұрын
【 HTML 】 meta 標籤
2:53
Жыл бұрын
【 HTML 】 下拉式選單
1:55
【 HTML 】 Button
2:19
Жыл бұрын
【 CSS 】 鄰居選擇器
1:25
Жыл бұрын
【 CSS 】 背景 background
4:41
【 CSS 】 定位 position
6:32
Жыл бұрын
【 HTML 】 Header 與 Footer
2:55
【 HTML 】 表格 Table
2:20
Жыл бұрын
【 HTML 】 b strong em
2:16
Жыл бұрын
Пікірлер
@王木匠-w8p
@王木匠-w8p 3 сағат бұрын
import random # help(random) # 随机整数 # print( random.randint(1,10) ) # 随机小数 # print( random.random() ) # 列表中随机选择一个元素 # options = ["剪刀", "石头", "布"] # rand_option = random.choice(options) # print("您出了",rand_option) # numbers = [1, 2, 3, 4, 5] # random.shuffle(numbers) # print(numbers) low = 1 high = 100 number = random.randint(low, high) guesses = 0 while True: guess = int(input(f"这是一个在{low}和{high}之间的猜数字游戏。")) guesses += 1 if guess < number: print("你猜的太小了!") elif guess > number: print("你猜的太大了!") else: print(f"你竟然猜对了,没错,就是 {number}") print(f"你竟然用了{guesses}次才猜中!") break
@terrysu0222
@terrysu0222 7 сағат бұрын
請問有辦法單純取得倒數4個數字嗎? 例如:number='1234-5678-9101-1121' last_four_number=number[-1:-4] 這樣無法取得字串~ 還是得先last_number=number[-1] 取得最後一個字元 再以last_three_number=number[15:-1] 呢? 若是有幾萬個字元但想取得最後字元該怎麼辦呢? 以上再麻煩老師解答,麻煩了,謝謝~
@王木匠-w8p
@王木匠-w8p 12 сағат бұрын
menu = { "pizza": 300, "popcorn": 200, "fries": 20, "hamburger": 29, "cola": 3 } print("菜单") print("----------") cart = [] total = 0 for item, price in menu.items(): print(f"{item} 的价格是 {price}") while True: food = input("请输入商品名称(输入exit结束):") if food == "exit": break elif menu.get(food) is None: print("此商品不存在。") else: cart.append(food) total += menu.get(food) print(food, end=" ") print(f"您的商品总共浪费了{total}元")
@linlinguentouri5269
@linlinguentouri5269 12 сағат бұрын
如何执行 "注解掉"?
@王木匠-w8p
@王木匠-w8p 12 сағат бұрын
capital = { "United States": "Washington DC", "japan": "Toyko", "Facnce": "Paris" } # get()取键值 # print(capital.get("japan")) # #update 更新、添加键值对 # capital.update({"Germany": "Berlin"}) # print(capital) # # # pop() 删除键值对 # capital.pop("United States") # print(capital) # values() 获得所有value # print(capital.values()) # items() 获得所有键值对 print(capital.items())
@shaoyuanwu9094
@shaoyuanwu9094 18 сағат бұрын
非常感謝~~
@王木匠-w8p
@王木匠-w8p Күн бұрын
# list, set, tuple goods = [] prices = [] while True: good = input("请输入想购买的商品:") if good.lower() == "q": break price =float(input("请输入价格:" )) goods.append(good) prices.append(price) # print("商品", goods) # print("价格", prices) # # for index,good in enumerate(goods): # print("索引", index) # print("商品名称", good) # # for index, price in enumerate(prices): # print("价格", price) for index, good in enumerate(goods): print(f"第 {index + 1} 个商品是 {good},价格是 {prices[index]:.2f}") total = sum(prices) print(f"总价格是: {total} 元")
@s2097play
@s2097play Күн бұрын
1:15:30 字串方法,重複很多次字母大小寫方法是要讓我們新手加強的嗎?
@s2097play
@s2097play Күн бұрын
1:10:36 邏輯運算子 沒有看到not的範例
@王木匠-w8p
@王木匠-w8p Күн бұрын
fruits = ["apple","orange","banana","cocnut"] # print(fruits[0]) # for f in fruits: # print(f,end=" ") # fruits.append("apple") # print(fruits) # fruits.remove("orange") # print(fruits) # print(fruits.index("banana")) # fruits.append("banana") # fruits.append("banana") # fruits.append("banana") # print(fruits) # print(fruits.count("banana")) # fruits.reverse() # print(fruits) # set # fruits_set = {"apple","orange","banana","coconut"} # for f_s in fruits_set: # print(f_s, end=" ") # print() # if "apple" in fruits_set: # print("we have an apple now") # else: # print("we don't have apple") # # if "watermelon" in fruits_set: # print("we have an watermelon now") # else: # print("we don't have watermelon") # tuple fruits_tuple = ("apple","orange","banana","coconut") # fr = fruits_tuple.count("apple") # print(fr) location = fruits_tuple.index("orange") print(location)
@王木匠-w8p
@王木匠-w8p Күн бұрын
# for x in range(1,10): # print(x, end=" ") # for y in range(5): # for x in range(1,10): # print(x,end=" ") # print() # rows = int(input("请输入行数:")) # cols = int(input("请输入列数:")) # symbol = input("请输入符号:") # for i in range(rows): # for j in range(cols): # print(symbol,end=" ") # print() import time my_time = int(input("请输入秒数:")) for x in range(my_time,0,-1): seconds = x % 60 minutes = x //60 % 60 print(f"{minutes:02}:{seconds:02}") time.sleep(1) print("时间到了。")
@王木匠-w8p
@王木匠-w8p Күн бұрын
# for x in range(1,10): # print(x, end=" ") # for y in range(5): # for x in range(1,10): # print(x,end=" ") # print() rows = int(input("请输入行数:")) cols = int(input("请输入列数:")) symbol = input("请输入符号:") for i in range(rows): for j in range(cols): print(symbol,end=" ") print()
@小小-g7g
@小小-g7g Күн бұрын
各位在 1:54:14 巢狀圈end= 是甚麼意思????
@CodeShiba
@CodeShiba Күн бұрын
print 預設是使用換行符號,如果不輸入 end="" 預設會換行,也就是預設為 end=" " 在程式中是換行的符號代表
@horusyang
@horusyang Күн бұрын
# if else elif 控制流程 # boolean 布林值 # elif=else if bondyield = float(input("請輸入美國債卷殖利率(%)")) stock = str(input("請輸入股票名稱")) stockprice = float(input("請輸入股票價格")) epsfy = float(input("請輸入當年度EPS")) epsest = float(input("請輸入明年度EPS")) dividend_payout_ratio = float(input("請輸入近五年股息發放率(%)")) EST_dividend = epsest * dividend_payout_ratio / 100 dividend_yield = EST_dividend / stockprice * 100 print(dividend_yield) if dividend_yield >= bondyield: print("股息報酬優於債卷") else: print("股息報酬劣於債卷") if dividend_yield >= 10: print("好的存股標的及建議重新審核是否存在偏差") elif dividend_yield >= 7: print("存股優選擇並確認產業發展") elif dividend_yield >= 5: print("存股好選擇並確認產業發展") else: print("非建議存股") 請輸入美國債卷殖利率(%)4.5 請輸入股票名稱統一超 請輸入股票價格293 請輸入當年度EPS11.22 請輸入明年度EPS12.19 請輸入近五年股息發放率(%)94.94 3.9498928327645046 股息報酬劣於債卷 非建議存股 Process finished with exit code 0 謝謝老師
@王木匠-w8p
@王木匠-w8p Күн бұрын
amount = 0 rate = 0 time = 0 while amount <= 0: amount = float(input("请输入本金金额:")) if amount <= 0: print("本金金额不能小于等于零。") while rate <= 0: rate = float(input('请输入利率:')) if rate <=0: print('利率不能小于等于0.') while time <= 0: time = int(input("请输入年限:")) if time <= 0: print("年限不能小于等于0.") print("您的本金是",amount) print("利率是", rate) print("年限是",time) total = amount * (1 + (rate / 100)) **time print("总金额是",total)
@Caker1001
@Caker1001 Күн бұрын
hour = int(input("請輸入這個月工讀時數")) if hour >= 150: print ("你這個月很忙,工作太久了") elif hour >= 140: print("你這個月大忙") elif hour >= 130: print("你這個月小忙") elif hour >= 120: print("你這個月稍稍忙") elif hour >= 100: print("你這個月生活與工作有平衡") else : print("你想吃土嗎?")
@王木匠-w8p
@王木匠-w8p Күн бұрын
# # name = input("please enter yout name:") # # if name == "": # # print('你没有输入名字。') # # else: # # print(f'欢迎您, {name}') # # name = input('please enter your name:') # while name != 'a': # print(input('please enter your name:')) # # print(f'welcome,{name}') num = int(input('please enter your number:')) while num < 0 or num > 9: print(f'您输入的数字{num}无效') num = int(input('please enter your number:')) print(f'您输入的数字是 {num}')
@王木匠-w8p
@王木匠-w8p 2 күн бұрын
price_1 = 32.22121 price_2 = -22 price_3 = 12.33 # print(f'price one is{price_1} ' # f'price two is{price_2} ' # f'price three is{price_3}') # print(f'price one is{price_1:.2f} ' # f'price two is{price_2:.2f} ' # f'price three is{price_3:.2f}') # print(f'price one is{price_1:+.2f} ' # f'price two is{price_2:+.2f} ' # f'price three is{price_3:+.2f}') print(f'price one is{price_1:10.2f} ' f'price two is{price_2:10.2f} ' f'price three is{price_3:10.2f}') print(f'price one is{price_1:<10.2f} ' f'price two is{price_2:<10.2f} ' f'price three is{price_3:<10.2f}') print(f'price one is{price_1:>10.2f} ' f'price two is{price_2:>10.2f} ' f'price three is{price_3:>10.2f}') print(f'price one is{price_1:^10.2f} ' f'price two is{price_2:^10.2f} ' f'price three is{price_3:^10.2f}') print(f'price one is{price_1:>+.2f} ' f'price two is{price_2:>+.2f} ' f'price thr is{price_3:>+.2f}')
@王木匠-w8p
@王木匠-w8p 2 күн бұрын
credit_number = '1234-4124-412-442141' firt_char = credit_number[0] print('第一位数字',firt_char) second_char = credit_number[1] print('第二个数字',second_char) first_fouth =credit_number[0:4] print('from the first to the fouth',first_fouth) last_one =credit_number[-1] print('the lasr number',last_one) second_to_last =credit_number[-2] print('the second to last number is',second_to_last)
@王木匠-w8p
@王木匠-w8p 2 күн бұрын
# # help(str) # # user name # name = "novel reader" # lenth = len(name) # print("your name has",lenth,"characters in total") # # # 找到第一个空格 # space_pos = name.find(" ") # print("第一个空格出现在",space_pos,"个字元") # # name_capitalized = name.capitalize() # print("您的全名:",name_capitalized) # # name_upper = name.upper() # print("您的全名是:",name_upper) # # name_lower = name.lower() # print("您的全名是:",name_lower) # # # count # phone_number = input("please enter yout phone number:") # dash_count = phone_number.count('-') # print("your phone has",dash_count,"-") # # phone_number = phone_number.replace('-',' ') # print("your phone number is:",phone_number) username = input('please enter your username:') if len(username) > 12: print('the longest username character cannot exceed 12 characters') elif ' ' in username: print('spaces cannot be used in usernames') elif not username.isalpha(): print('characters other than roman letters cannot be used in usernames') else: print('welcome',username)
@王木匠-w8p
@王木匠-w8p 2 күн бұрын
temp = int(input("please enter current temperature")) # if temp > 0 and temp < 30: # print("comfortable temperature") # else: # print("hash temperature") if temp <= 0 or temp >= 30: print("hash temperature") else: print("comfortable temperature")
@yenju1106
@yenju1106 2 күн бұрын
已經從Perplexity找到答案了 修改如下即可 while player not in options: player= input("input error, please key in paper,scissors, rock").lower( )
@CodeShiba
@CodeShiba Күн бұрын
問 ChatGPT 回答的比較詳細,比較有學習的效果。
@yenju1106
@yenju1106 2 күн бұрын
您好 是否有高人可以幫忙說明,謝謝 import random player = None computer = None running = True options = ("paper", "scissors", "rock") while running : player = input("Please key in paper, scissors, rock") while player not in options: input("Please key in paper,scissors, rock") computer = random.choice(options) print(f"player: {player}, computer:{computer}") if player == computer: print("draw") elif player == "scissors" and computer == "paper": print("player won") elif player == "rock" and computer == "scissors": print("player won") elif player == "paper" and computer == "rock": print("player won") else: print("computer won") play_again = input("play again? y/n").lower() if not play_again == "y": running = False print("Thank you for playing the game") ------------------------------------------------------------------- 問題如下 while player not in options: input("Please key in paper, scissors, rock") 我發現如果我故意一開始打錯 程式會一直重複而跳不出來 例如 我故意打stone 結果如下 Please key in paper, scissors, rock stone Please key in paper,scissors, rock paper Please key in paper,scissors, rock scissors Please key in paper,scissors, rock rock Please key in paper,scissors, rock
@王木匠-w8p
@王木匠-w8p 2 күн бұрын
unit = input("please enter the temperature unit(摄氏C,华氏F):") temperature = float(input('what is the temperature today?')) if unit == 'C': temperature = round(9 * temperature / 5 + 32) print(f'the current temperature is {temperature}度F') elif unit == 'F': temperature = round((temperature - 32) * 5 / 9) print(f'the current temperature is {temperature}度C') else: print("what the fuck?")
@王木匠-w8p
@王木匠-w8p 2 күн бұрын
weight = float(input('please enter your weight:')) unit = input("is your weight in kilograms or pounds?(kg/lb):").upper() if unit == 'KG': weight *= 2.2 new_unit = '磅' elif unit == 'LB': weight /= 2.2 new_unit = '公斤' else: print('incorrect units') exit() print(f'your weight is {round(weight)} {new_unit}')
@王木匠-w8p
@王木匠-w8p 2 күн бұрын
operator = input('请输入运算符号(加法:+,减法:-,乘法:*,除法:/):') num1 = float(input('请输入数字一:')) num2 = float(input('please enter the second number:')) if operator == '+': result = num1 + num2 elif operator == '-': result = num1 - num2 elif operator == '*': result = num1 * num2 elif operator == '/': result = num1 / num2 else: print("invalid operator symbol") print(f"the result of the operation is{result}")
@王木匠-w8p
@王木匠-w8p 2 күн бұрын
# # for_sale = True # # if for_sale: # # print("此项目正在出售") # # else: # # print("此项目未出售") # age = int(input("请输入年龄")) # if age >= 18: # print("可以注册") # else: # print("你可以付费注册") age = int(input("请输入您的年龄")) if age<= 0: print("请慢慢投胎") elif age>= 100: print("恭喜您修成正果") else: print("赶紧去上班")
@王木匠-w8p
@王木匠-w8p 2 күн бұрын
# # apples = 3 # # apples = apples + 1 # # print(apples) # # apples += 1 # # print(apples) # # apples -= 3 # # print(apples) # # apples *=100 # # print(apples) # # apples /= 20 # # print(apples) # print(100 % 3) # print(pow(2,3,3)) # x = 12 # y = 221 # z = 128819 # print(max(x,y,z)) # print(min(x,y,z)) # a = -3.2199 # print(round(a)) # print("绝对值:",abs(a)) # import math # # # x=4.3 # # print(round(x)) # # print(math.ceil(x)) # # print(math.floor(x)) # radius = float(input("请输入圆的半径:")) # c = 2 * math.pi * radius # print(f"圆的周长为{round(c,2)}") import math radius = float(input("请输入圆的半径:")) area = math.pi * pow(radius,2) print(f"圆的面积为:{round(area,2)}")
@王木匠-w8p
@王木匠-w8p 2 күн бұрын
apples = 3 apples = apples + 1 print(apples) apples += 1 print(apples) apples -= 3 print(apples) apples *=100 print(apples) apples /= 20 print(apples)
@horusyang
@horusyang 3 күн бұрын
# Python內建中的數學 # 加減乘除 x = 4 x = x+2 x += 2 x = x-2 x -= 2 x = x*4 x *= 4 x = x/4 x /= 4 # 指數(平方、三次方) 純手工公式 x =x ** 2 x **= 2 print(x) # 模數 mod(餘數) % # 13 mod 5 等於 2 餘 3 print(13 % 5) # 14 mod 5 等於 2 餘 4 print(14 % 5) # 15 mod 5 等於 3 餘 0 print(15 % 5) # 次方另一種呈現方式pow y = 2 print(pow(y,5)) # 最大值Max和最小值Min a = 15 b =2 c =31 print(max(a,b,c)) print(min(a,b,c)) # 四捨五入計算round a1 = 3.5484123 print(round(a1)) print(round(a1,1)) print(round(a1,2)) print(round(a1,3)) # 絕對值abs a2 = -31.235 print(abs(a2)) print(abs(round(a2,2))) # python math模組數學函數 --------------------------------------------------------- # python math模組數學函數 import math # 四捨五入、無條件進位(要math)celi、無條件捨去(要math)floor x = 31.256 print(round(x,2)) print(math.ceil(x)) print(math.floor(x)) # 圓周率𝝿 math.pi print(math.pi) # 圓周長 2𝝿R # 圓面積 𝝿R^2 # 圓柱表面積 2*𝝿R^2+2𝝿R*L # 圓柱體積 𝝿R^2*L r = input("請輸入圓半徑:") r = float(r) L = input("請輸入圓柱高:") L = float(L) circle_length = 2*math.pi*r circle_area = math.pi*pow(r,2) circle_surfacearea = 2*circle_area + circle_length*L circle_volume = circle_length*circle_area print(round(circle_area,2),round(circle_area,2),round(circle_surfacearea,2),round(circle_volume,2)) 感謝老師
@王木匠-w8p
@王木匠-w8p 3 күн бұрын
item = input("您想要购买什么东西?") price = float(input("单价是?")) quantity = int(input("您想要买几只?")) total = price * quantity print(f"您购买了{quantity}只{item},单价是{price},总共需支付{total}元。") 您想要购买什么东西?A片 单价是?56 您想要买几只?143 您购买了143只A片,单价是56.0,总共需支付8008.0元。
@王木匠-w8p
@王木匠-w8p 3 күн бұрын
length = float(input("请输入长度")) width = float(input("请输入宽度")) area = length * width print(f"面积为{area}")
@王木匠-w8p
@王木匠-w8p 3 күн бұрын
noun_1 = input("请输入一个演员的名字:") noun_2 = input("请输入一个演员的名字:") adj_1 = input("请输入一个形容词:") adj_2 = input("请输入一个形容词:") adj_3 = input("请输入一个形容词:") print(f"我今天在街上,非常{adj_1}看到书店展出着{noun_1}和{noun_2}共演的一张影片,太{adj_2}了,这一定是一场{adj_3}的梦")
@王木匠-w8p
@王木匠-w8p 3 күн бұрын
请输入一个演员的名字:麻美 请输入一个演员的名字:青空 请输入一个形容词:惊奇 请输入一个形容词:不可思议 请输入一个形容词:虚无缥缈 我今天在街上,非常惊奇看到书店展出着麻美和青空共演的一张影片,太不可思议了,这一定是一场虚无缥缈的梦
@淏
@淏 3 күн бұрын
練習1 name = input("請輸入你的名字:") print(f"Hello {name}") print('歡迎來玩填詞遊戲') n_1 = input('輸入一個人名:') n_2 = input('輸入一個地名:') adj_1 = input('請輸入一個形容詞:') Nuber = input('請輸入一個數字:') v = input('輸入一個動詞:') adj_2 = input('請輸入第二個形容詞:') print(f"今天{n_1}去了{Nuber}次{n_2},{n_1}在裡面{v}並感到{adj_1}以及{adj_2}")
@horusyang
@horusyang 3 күн бұрын
stock_code = input("Enter stock code: ") # print(f"查詢的股票代號{stock_code}") date = input("Enter date: ") # print(f"日期為{date}") # print(type(date)) stock_price = input("Enter stock price: ") stock_price = float(stock_price) # print(f"當日收盤價格為{stock_price}") # print(type(stock_price)) dividend = input("Enter dividend: ") dividend = float(dividend) # print(f"最近一期股利方放金額為{dividend}") stock_yeild = (dividend / stock_price)*100 print(type(stock_yeild)) print(f"日期:{date},股票代碼{stock_code},當日股價為{stock_price},股息為{dividend},殖利率為{stock_yeild}%") 謝謝教學
@lan_lie
@lan_lie 4 күн бұрын
我想考證照,看我這影片我可以考到基礎級嗎
@黎家昇-c3f
@黎家昇-c3f 4 күн бұрын
會教java嗎
@horusyang
@horusyang 4 күн бұрын
# 格式型別轉換 type casting # integer整數 # float浮點數 # string字串 # boolean 布林值 # complex複數 name = "Horus" age = 27 weight = 67.50 is_adult = True # 顯示轉換 weight = int(weight) print(weight) print(type(weight)) age = float(age) print(age) print(type(age)) is_adult = str (is_adult) print (is_adult) print(type(is_adult)) # 隱示轉換 # 隱式型別轉換的邏輯與規則 # 低精度向高精度轉換:Python 通常會將精度較低的數據型別(如整數 int)轉換為精度較高的型別(如浮點數 float)以避免資料丟失。 # 數字型別轉換優先順序:型別的優先順序通常為 int < float < complex,Python 根據此順序自動轉換。例如,int 與 float 相加時,int 會被轉換為 float。 # 運算中的自動轉換:當兩個不同型別的數字參與運算時,Python 會自動將精度較低的型別轉換為精度較高的型別。例如 3 + 4.0,Python 會將 3 轉換為 3.0,結果為 7.0。 x = 1+3j y = 3.33 z = 4 sum = (x+y+z) print(sum) print(type(sum))
@hifoontw
@hifoontw 5 күн бұрын
謝謝教學分享! # 型別轉換type casting 顯式 / 隱式 name = "Hifoon" height = 1.7 weight = 65 student = True # 顯式型別轉換 height = float(height) print(height) print(type(height)) weight = int(weight) print(weight) print(type(weight)) name = bool(name) print(name) print(type(name)) student = str(student) print(student) print(type(student)) # 隱式型別轉換 BMI = weight/(height*height) print(BMI) print(type(BMI)) Hifoon = student print(name) print(type(name)) ------------------------------------------------------------- 1.7 <class 'float'> 65 <class 'int'> True <class 'bool'> True <class 'str'> 22.49134948096886 <class 'float'> True <class 'bool'>
@horusyang
@horusyang 5 күн бұрын
# 變數是一個可重複使用的容器,用於儲存值,變數的行為就好像它所包含的值一樣 # 在寫程式中也是類似的 # 當我們創建一個變數時,我們需要給他一個特定的名稱,來表示所含的內容 # 字串和數字是不同的資料格式,本次範例age是一個整數integer,"我的年紀是"是一個字串,兩個格式不同要透過str轉成相同格式 # integer整數 age = 25 print(f"我的年紀"+str(age)+"歲") print(type(age)) # float浮點數 weight = 67.50 print(f"我的體重"+str(weight)+"kg") print(f"我的體重{weight}kg") print(type(weight)) # string字串 grade = 'NCKU' print(f"我畢業於"+grade+"college") print(f"我畢業於{grade}College") print(type(grade)) # boolean 布林值 (只有true 和 false) if age >= 25: is_adult = True print("青壯年") else: is_adult = False print("青年") print(type(is_adult)) 感謝老師 10/24簽到
@SaySaySee
@SaySaySee 5 күн бұрын
5:40 新建專案 6:00 6:10 6:30 8:39 MAC版
@july_eagle
@july_eagle 8 күн бұрын
# integer 整數 year = 20 print(f"當中醫師 {year} 年") print(type(year)) # float 浮點數 score = '360.5' print(f"當年上榜分數 {score} 分") print(type(score)) # string 字串 subject="國文" print(f"什麼科目最難?{subject}") print(type(subject)) # boolean布林值 yes=True print (f"相信自己,就會成功嗎?{yes}") print(type(yes)) 當中醫師是我最終想達到人生目標!
@XiyuanZhao-p6x
@XiyuanZhao-p6x 8 күн бұрын
老师好, 我想问一下我们可以用隐式转换string 和 boolean吗?
@hifoontw
@hifoontw 5 күн бұрын
您好,我剛剛試了一下不知道是不是指這樣? name = "Hifoon" student = True Hifoon = student print(name) print(type(name)) run-------------------------------------- True <class 'bool'>
@XiyuanZhao-p6x
@XiyuanZhao-p6x 5 күн бұрын
@@hifoontw 等我放学回家试一下
@XiyuanZhao-p6x
@XiyuanZhao-p6x 5 күн бұрын
@@hifoontw 谢谢
@july_eagle
@july_eagle 9 күн бұрын
感謝教學
@minxinlaile
@minxinlaile 9 күн бұрын
咋不更新了
@XiyuanZhao-p6x
@XiyuanZhao-p6x 10 күн бұрын
老师这是今天的作业 #integer grade=6 print(f"我今年{grade}年级了") print(type(grade)) #float hour=8.5 print(f"每天我都睡{hour}小时") print(type(hour)) #strings place='USA' print(f"我在{place}上学") print(type(place)) #boolean test=True print(f"这次benchmark我一定能拿100分。{test}") print(type(test)) 谢谢老师的讲解,很清晰
@johon8964
@johon8964 10 күн бұрын
請問柴大,我想問「為甚麼有些網站無法抓它們的完整html碼?」(例如,自己想要從hahow網站中直接將 " 所有領域"的html碼抓下來;但使用BeautifulSoup後,他只有抓到部分代碼;但無法抓出全部代碼(我的soup.find_all為("div");但他只有顯示<div id=' root '>,就沒了))
@annashaw8751
@annashaw8751 10 күн бұрын
非常感谢。请教一个问题,我的运行框里面,只能英文和数字,为什么不能输入中文。input那个内容
@YHYU-ij3jg
@YHYU-ij3jg 11 күн бұрын
很棒的影片。 音質有進步空間。
@CodeShiba
@CodeShiba 11 күн бұрын
因為爆音嗎
@YHYU-ij3jg
@YHYU-ij3jg 11 күн бұрын
​@@CodeShiba 開頭就爆音 我覺得多數人好像沒那麼重視音質的問題 所以提一點個人看法
@CodeShiba
@CodeShiba 10 күн бұрын
@@YHYU-ij3jg爆音這問題後來我有發現,來不及了處理。麥克風有用比較好的麥克風,音質應該還可以。我再注意一下,謝謝。
@kimijiajun
@kimijiajun 13 күн бұрын
第一堂課作業 #integer badminton_points = 21 print(f"羽球比賽的單局決勝分是 {badminton_points }分“) #float Full_Marathon = 42.195 print(f"全程馬拉松的距離是 {Full_Marathon} 公里“) #String Company_name =  company print(f"我服務的公司是 {Company_name} “) #boolean on_job = True print(f"您現在是否在職 {on_job}")