iT邦幫忙

python3相關文章
共有 817 則文章
鐵人賽 自我挑戰組 DAY 9

技術 Day09: Python注釋總類

Codetags和TODO注釋:Codetags(程式碼標籤)的形式為帶有大寫標籤的注釋。像是TODO並寫上簡短描述可以幫助提示未來須繼續完成工作。另外像是F...

技術 leetcode with python:58. Length of Last Word

題目: Given a string s consisting of words and spaces, return the length of the l...

鐵人賽 Software Development DAY 16

技術 Decimals 的數學運算

Div and Mod integer 和 Decimals 遇到 // 和 % 運算子 (當然也包括 divmod() 函式) 的行為不大相同: Decim...

技術 leetcode with python:476. Number Complement

題目: The complement of an integer is the integer you get when you flip all the 0...

技術 leetcode with python:119. Pascal's Triangle II

題目: Given an integer rowIndex, return the rowIndexth (0-indexed) row of the Pas...

技術 leetcode with python:7. Reverse Integer

題目: Given a signed 32-bit integer x, return x with its digits reversed. If reve...

鐵人賽 AI & Data DAY 23

技術 [Day23] Logistic Regression-Example(01)

Dataset 今天範例的資料是社交網路上使用者的基本數據包含userID, 性別, 年齡, 預估薪資, 以及是否購買產品 假設有一家汽車公司出了一款新的SU...

技術 leetcode with python:461. Hamming Distance

題目: The Hamming distance between two integers is the number of positions at whi...

技術 leetcode with python:387. First Unique Character in a String

題目: Given a string s, find the first non-repeating character in it and return i...

技術 leetcode with python:83. Remove Duplicates from Sorted List

題目: Given the head of a sorted linked list, delete all duplicates such that eac...

技術 leetcode with python:342. Power of Four

題目: Given an integer n, return true if it is a power of four. Otherwise, return...

鐵人賽 AI & Data DAY 25

技術 [Day25] Logistic Regression-打造樣板

下面是使用分類器的python template之後我們會學習其他的分類器只要用這個樣板, 再換上要使用的分類器(step2)類別即可 1. 資料前處理 Im...

技術 [LeetCode] 134. Gas Station

MediumRelated Topics: Array / GreedyLeetCode Source 解題想法 這題是看之前解的方法 Python cl...

技術 leetcode with python:191. Number of 1 Bits

題目: Write a function that takes an unsigned integer and returns the number of '...

技術 leetcode with python:344. Reverse String

題目: Write a function that reverses a string. The input string is given as an ar...

鐵人賽 Software Development DAY 1

技術 [01] 所以是哪個 P ? 前言

首先先來看看我們 P 開頭的程式語言有哪些吧 恩,比我預想的還多原本是寫 PHP 的,寫了四年想摸摸看別的語言主要原因是前陣子在研究國外職缺的時候發現,PHP...

技術 leetcode with python:405. Convert a Number to Hexadecimal

題目: Given an integer num, return a string representing its hexadecimal represen...

技術 leetcode with python:303. Range Sum Query - Immutable

題目: Given an integer array nums, handle multiple queries of the following type:...

技術 leetcode with python:13. Roman to Integer

題目: Roman numerals are represented by seven different symbols: I, V, X, L, C, D...

技術 leetcode with python:441. Arranging Coins

題目: You have n coins and you want to build a staircase with these coins. The st...

技術 leetcode with python:414. Third Maximum Number

題目: Given an integer array nums, return the third distinct maximum number in th...

鐵人賽 AI & Data DAY 27

技術 [Day27] SVM - Example

前面的文章有學到分類器樣板了今天的例子跟 https://ithelp.ithome.com.tw/articles/10305851 用到的一樣然後會套用 h...

鐵人賽 Software Development DAY 28

技術 **kwargs

今天我們來研究 **kwargs: def func(**kwargs): print(kwargs) func(x=100, y=200) {'x...

技術 leetcode with python:485. Max Consecutive Ones

題目: Given a binary array nums, return the maximum number of consecutive 1's in...

鐵人賽 Software Development DAY 20

技術 [20] [燒瓶裡的部落格] 10. 心得

這個部落格練習難度明顯比前一份的難度要提升不少也使用到一些共用的概念 首先介紹了工廠模式[燒瓶裡的部落格] 01. 初始化一個 Flask 專案 - 使用工廠模...

鐵人賽 自我挑戰組 DAY 18

技術 [Day18] Codewars >>> Probabilities for Sums in Rolling Cubic Dice (Python)

題目(5kyu): When we throw 2 classical dice (values on each side from 1 to 6) we h...

技術 leetcode with python:145. Binary Tree Postorder Traversal

題目: Given the root of a binary tree, return the postorder traversal of its node...

鐵人賽 自我挑戰組 DAY 3

技術 Day03: 程式相關問題該如何提問?

當網路搜尋無法解決掉您的問題時,可以在網路上透過提問方式尋求幫助。在網路上提問解Bug可以當作最後一個選項,因為通常無法得到即時性的回應。若已經用盡其他方法也無...

鐵人賽 自我挑戰組 DAY 13

技術 Day 13: Python程式的秘密

使用enumerate,不要用range(len(x)) city_list = ["Taipei","beijing&quo...

鐵人賽 自我挑戰組 DAY 10

技術 棋(奇)人在此,挑戰鐵人三項 Day10: 澳洲的浪漫最後一晚(下篇)

台灣好味道 想知道午餐前發生什麼驚滔駭浪的事嗎?請看Day9,會有意想不到的收穫哦!在澳洲的最後一頓午餐,在誤打誤撞地情況下,吃到道地台式午餐,那碗爌肉乾麵好吃...