雙失廢青從0(+5)開始自學python

288 回覆
240 Like 26 Dislike
2022-01-10 13:28:43
唔熟個programme 點run
唔知係個loop 入邊return 會點, 所以又另外拎左兩個variables 出黎return

依家睇返人地d ans, 似乎係loop 入邊return 都會即刻break 左個loop
2022-01-10 13:32:17
其實我係無聊屎忽痕學
但冇乜idea 要寫d 咩出黎
睇你#1 段片學, 但學完唔練又係用唔到, 所以諗住搵d 題目練
點知leetcode d 題目原來係挑戰題黎

唔知邊度搵到d 練習題岩我水平, 但又有答案對
2022-01-10 13:45:17
咁我覺得你要學寫曲
有個好重要一定要學既野
就係點樣善用google
相信search python exercise for beginner應該唔太難
講返return 你落手落腳試多幾次就知嫁啦
2022-01-10 13:46:51
試吓唔睇教學吓寫隻包剪揼出黎
如果覺得太簡單既試吓寫hangman
2022-01-10 19:34:22
Day10
oldie but a goldie
今日見到個用cookie clicker做例子教你用selenium既教學
手多click左入去跟佢玩
一唔小心就玩左半日
https://www.youtube.com/watch?v=OISEEL5eBqg
好耐無玩過cookie clicker 今日又玩返 玩完改code再玩再改code
其實幾得意
因為有巴打跟我個進度 我補充返少少野
尋日條片同今日條片有部份既syntax selenium已經棄用嫁啦
你地要自己google返新既command再自己改左佢
我就唔列出黎啦 試吓自己google



btw 點解一學python ig就彈咁多bootcamp廣告dllm
2022-01-10 23:29:36
Leetcode唔係用嚟練寫曲的
2022-01-11 06:33:33
用乜ide? Vscode? 識用breakpoint debug?
2022-01-11 06:35:06
你應該行debug mode, step over,逐行睇啲code 點行
2022-01-11 06:39:17
你一開頭可以花幾日熟咗啲syntax 先,搵本好既書或tutorial, 將啲example 用手打一次出來,再逐行run 同print value 睇結果
最基本真係呢幾樣架咋
for, while, if
list, tuple, map, set
oop
2022-01-11 13:48:06
Xcode...

我中學時期,蘋果出Swift,我先買部Mac,裝Xcode,打算學Swift 搞ios app。

依加 狗也不屌。依個IDE真心廢。

裝Anaconda、Azure ML Studio、VS/VSC,學Python仲好
2022-01-11 14:12:52
非常推薦跟我個path一齊學既巴打跟條片去做一次
因為條友原來段曲有D bug 唔知點解佢成功咁run到啦
但我覺得跟佢寫再搵佢既bug出黎係一個好好既練習
去睇你到底明唔明佢做緊咩同了解佢犯左咩錯
2022-01-11 17:00:44
其實到宜家都唔係好明python個return
點解唔用print 要用return? 用第2個方法多過1
1.
def multiply(num1,num2):
result = num1 * num2
print(result)
multiply(8,6)
=================================
2.
def multiply(num1,num2):
return num1 * num2
print(multiply(8,6))
2022-01-11 17:11:06
其實到宜家都唔係好明python個return
點解唔用print 要用return? 用第2個方法多過1
1.

def multiply(num1,num2):
result = num1 * num2
return result
def minus(num3,num4):
result=num3-num4
return result
print(multiply(8,6)+minus(8,6))


=================================
2.
def multiply(num1,num2):
return num1 * num2
print(multiply(8,6))

我都唔太識 但我睇法係你return一個function出既野可以用落其他既曲到
2022-01-11 17:14:43
同埋係個loop到return 會stop個loop print唔會
2022-01-11 17:21:37
def divide5_p(k):
    for i in range(k):
        if i%5==0 and i!=0:
            print(i)
divide5_p(1000)
=================================================
def divide5_r(k):
    for i in range(k):
        if i%5==0 and i!=0:
            return(i)

print(divide5_r(1000))
2022-01-11 18:02:55
return ends the execution of the function call immediately and returns you a result that you can assign to a variable or pass as a reference for future use.

print only prints out the result on stdout which you can view on your output console. You cannot do anything on the result other than viewing it. Also print returns None as default.
2022-01-11 18:11:16
好似明明地
2022-01-11 18:11:31
唔該哂巴打
2022-01-11 18:48:16
因為有d 野你唔係想print 出黎
而係想直接用

你用return 既話, multiply(8,6) 呢舊野已經係代表緊48, 可以直接套入其他地方用
但如果你print 個48出黎, 就對其他code 冇乜用, 純粹俾人睇
2022-01-11 22:46:37
返工日子真係好攰唔想睇
又SEARCH左個網黎睇, 好似好過睇片
https://pynative.com/basic-python-quiz-for-beginners/

入邊D QUIZ都好有深度咁

2. A string is immutable in Python?

Every time when we modify the string, Python Always create a new String and assign a new string to that variable.

3. Can we use the “else” block for for loop?

for example:

for i in range(1, 5):
print(i)
else:
print("this is else block statement" )



題題都要GOOGLE先識答
2022-01-12 00:46:06
Day 11
回到基本步 打基礎
當selenium去到更複雜既程度
要用class同埋要去做unit test既時候
最原本既oop根基差既問題就浮出黎了 (wtf is __get__)

今日花左好多時間去了解咩野係_咩野係__(其實都係一知半解)
同埋去了解個堆相對應既__dir
我最原先對__既理解只係
if __name__='__main__':既時候去判斷佢到底係咪黎自呢個.py檔
點知原來一堆野都有佢意思 _同__係唔同野黎
R爆頭
今日又學識新野啦
https://www.youtube.com/watch?v=ALZmCy2u0jQ
2022-01-12 12:06:04
巴打幾勁玩左兩個星期未到已經玩selenium
2022-01-12 13:07:11
啱啱都學緊selenium路過
琴晚簡單寫咗個youtube hater
簡單撈曬某位youtuber所有片既URL, 再每條片入去dislike
琴晚發現video果頁一次出得30條片既LINK,要落到最底先會出下30條片
今晚再改良吓先
吹水台自選台熱 門最 新手機台時事台政事台World體育台娛樂台動漫台Apps台遊戲台影視台講故台健康台感情台家庭台潮流台美容台上班台財經台房屋台飲食台旅遊台學術台校園台汽車台音樂台創意台硬件台電器台攝影台玩具台寵物台軟件台活動台電訊台直播台站務台黑 洞