羅德興老師的教學歷程檔案 - 112-2 Blockchain - 隨堂作業
 

企業資訊與管理系
助理教授/日導
羅德興


歷程檔案 Portfolio

    隨堂作業


    作業 1:

    Learn Bitcoin’s underlying data structure in 4 short steps

    https://colab.research.google.com/drive/1fBgGiBMg25H-_7GtWX-MOLH3jmR0yiOe?usp=drive_link


    作業 2:
    50 行 Python 程式代碼構建一個區塊鏈
    https://colab.research.google.com/drive/1iqJevUk4Q_lu-NS465XdXqmqJbdpgj-b?usp=drive_link


    作業 3: 建立自己的區塊鏈
    [LINK]

    # source https://github.com/howCodeORG/Simple-Python-Blockchain/blob/master/blockchain.py
    import datetime
    import hashlib

    class Block:
        blockNo = 0
        data = None
        next = None
        hash = None
        nonce = 0
        previous_hash = 0x0
        timestamp = datetime.datetime.now()
           
        def __init__(self, data):
            self.data = data

        def hash(self):
            h = hashlib.sha256()
            h.update(
            str(self.nonce).encode('utf-8') +
            str(self.data).encode('utf-8') +
            str(self.previous_hash).encode('utf-8') +
            str(self.timestamp).encode('utf-8') +
            str(self.blockNo).encode('utf-8')
            )
            return h.hexdigest()

        def __str__(self):
            return "Block Hash 區塊 哈希值: " + str(self.hash()) + "\nBlockNo 區塊編號: " + str(self.blockNo) + "\nBlock Data 區塊資料: " + str(self.data) + "\nHashes 哈希值: " + str(self.nonce) + "\n--------------"

    class Blockchain:

        diff = 20
        maxNonce = 2**32
        target = 2 ** (256-diff)

        block = Block("Genesis") # 創世區塊
        dummy = head = block

        def add(self, block):

            block.previous_hash = self.block.hash()
            block.blockNo = self.block.blockNo + 1

            self.block.next = block
            self.block = self.block.next

        def mine(self, block):
            for n in range(self.maxNonce):
                if int(block.hash(), 16) <= self.target:
                    self.add(block)
                    print(block)
                    break
                else:
                    block.nonce += 1

    blockchain = Blockchain()

    max=3
    print("Print My name 這是 學號 111xxxxxx 姓名 羅老師 的區塊鏈 將會建立 %s 個區塊 \n\n" %(str(max)))
    for n in range(max):
        print('Enter your data 請輸入您的區塊內容:')
        x = input()
        temp ="Block " + str(n+1) +":" + x
        blockchain.mine(Block(temp))

    print("Print all the blockchain 列印出目前的整個區塊鏈......\n\n")
    while blockchain.head != None:
        print(blockchain.head)
        blockchain.head = blockchain.head.next





    作業 4:

    區塊鏈應用與分析隨堂作業 (download)

    NO:              NAME:

    Coding Tech (2018). Blockchain Technology Explained (2 Hour Course) 觀看後作業

    https://www.youtube.com/watch?v=qOVAbKKSH10 [LINK]

     

    一、請以一句話說明下列名詞

    1.      Blockchain evolution

    2.      Decentralized web

    3.      Distributed organizations

    4.      Distributed ledger

    5.      Smart contracts

    6.      Distributed applications

    7.      Internet of value

    8.      Token economies

    二、請寫下或繪出你觀看後的心得或提問







    作業 5:
    5-0
    台灣金融研訓院 TABF Channel Cheap教你金融科技力 (3~4 mins) https://www.youtube.com/playlist?list=PL9NZYNTi48oAD6_uj2aNLK4zFmpKZ5sxj

    5-1 
    How To Become A Blockchain Developer In 2023? https://www.youtube.com/watch?v=lg5ikF8k6yc

    5-2
    Blockchain Technology Simply Explained (2023) https://www.youtube.com/watch?v=QJn28fFKUR0


    5-3
    什麼是區塊鏈blockchain? ~~~淺談 區塊鏈的未來發展和應用 (2023, 01'49") https://www.youtube.com/watch?v=KnUpGADFSt4

    5-4 最強應用場景 DeFi (2021, 07'52")
    https://www.youtube.com/watch?v=ti0r4DtZPnw


    5-5
    艾倫悅讀空間

    https://www.youtube.com/watch?v=L92bh-KJJhY

    5-6
    堆金積玉

    https://www.youtube.com/watch?v=26kR2vUbbJo

    5-7
    堆金積玉

    https://www.youtube.com/watch?v=KJhG9NAq-dg

    5-8
    堆金積玉

    https://www.youtube.com/watch?v=wnHqLX6EKoM

    5-9
    堆金積玉

    https://www.youtube.com/watch?v=_8JVJb-vLg0&list=PL5MyrtRg74bWhO2j1671Mx6Mq2Ro2W2Bs




    5-10
    堆金積玉

    https://www.youtube.com/watch?v=FJHJHXTHDEY

    5-11
    堆金積玉

    https://www.youtube.com/watch?v=72HQIk5STAo

    5-12

    https://www.youtube.com/watch?v=Lse5l7_TRtI











     
    全部共 62則留言
    02-25 13:39:作業 3 繳交 https://colab.research.google.com/drive/14yk8oSGezsDoFuM6uKlZrF2xki1oFHtm?usp=sharing
    02-25 13:40:作業 3 繳交 https://colab.research.google.com/drive/14yk8oSGezsDoFuM6uKlZrF2xki1oFHtm?usp=sharing
    黃林賢02-25 13:41:https://colab.research.google.com/drive/1s_Qb7ZvXrpaCtruTJWHCoUtYXjiXh49K?usp=sharing
    游學宇02-25 13:42:https://colab.research.google.com/drive/1iJg16mow1hbpfxIWlEmPgEIRJkz5uclZ?usp=sharing
    莊翔宇02-25 13:42:作業三繳交 : https://colab.research.google.com/drive/1y7Mg9wmP4T5SDK2P1KXz3ITCZEKibz38?usp=sharing
    02-25 13:42:06作業繳交
    高宥宏02-25 13:42:https://colab.research.google.com/drive/14GvX6fiX5euKk1or0ONmbDk1QgUuXoU4?usp=sharing
    楊修武02-25 13:43:作業 3 繳交https://colab.research.google.com/drive/1JAWAVGKSpIB8BO_AVoRfYrxb-vkIiW-U?hl=zh-tw#scrollTo=-Dmoe8k5mkcF
    陳玉蓮02-25 13:43:https://colab.research.google.com/drive/1e_z6HJl4Iteaa_rD4aObpuktSmCQT6j4?usp=sharing
    陳玉香02-25 13:44:https://colab.research.google.com/drive/1DqGxhCx-wA0wDObB6lERhgF0tvh0s_vW?usp=sharing
    王寶茹02-25 13:44:作業3繳交https://colab.research.google.com/drive/1JauP6FAIK8qGL08rnEaryyEvPEsWOELJ?usp=sharing
    賀百福02-25 13:44:https://colab.research.google.com/drive/1qpBtDA-fMJwAU0ZwYf5CtjHv1iHS39QY?usp=drive_link
    林盈君02-25 13:45:作業三繳交 : https://colab.research.google.com/drive/1COx1itKWEfpMwyZxR83z4pDkOMeuwUhW?usp=sharing
    簡翊涵02-25 13:46:作業三繳交 : https://colab.research.google.com/drive/161o9ILHqyG7avw7j9XJwvfxGRP1bTaUG?usp=sharing
    02-25 13:49: 06作業繳交https://colab.research.google.com/drive/19yiMHbIMs19pTYmMipTtYfj4FOEEbX5x?usp=sharing
    洪素嬌02-25 13:49:https://colab.research.google.com/drive/1BjZ5Y2lExKDKpEjiSUl5jMP48ZACt48d
    嚴悅芳02-25 13:50:https://colab.research.google.com/drive/1PdPV30o436tMArkR7ly5LXjAUQi_arLC
    02-25 13:51:06侯品如https://colab.research.google.com/drive/1c_JuICRIeFVuH8XART-vmLBw0SsoZTCI?usp=drive_link
    陳羿臻02-25 13:52:https://colab.research.google.com/drive/1jusCpxi_zB2yQf8w7hfDiq2hbTV-ewbI
    周于純02-25 13:52:https://colab.research.google.com/drive/1T348oAo6nerWCuNVMbwMviqdeoGnBCMu?usp=sharing
    陳思娟02-25 13:52:https://colab.research.google.com/drive/1lpOd6qIe29odx1xQW0S-ja2cO8YTX6g3?usp=sharing作業3
    嚴悅芳02-25 13:53:https://drive.google.com/drive/folders/1L-zd9oAtVVAWkCQbyG2LBg7knY1DvfO3?usp=sharing
    王美英02-25 13:53:https://colab.research.google.com/drive/1hJci8QSehray_GmHSXBX8bUOUOh8xX-K
    徐嘉瑜02-25 13:55:作業3繳交 https://colab.research.google.com/drive/1UpKq3ddBKeAbyDF1zczu3dZHy2xDoLaY?usp=sharing
    賴秀玲02-25 13:55:https://drive.google.com/drive/folders/1trCJq66LHOsXUG9N2VGyi6SVviF3auS0?usp=sharing
    陳冠林02-25 13:55:https://colab.research.google.com/drive/1Gl34y2Tz1CNGtO6Y8EoBCs6onK7TgW8W?usp=sharing
    許嘉惠02-25 13:56:留言...
    賀百福02-25 13:56:https://colab.research.google.com/drive/1pCaNTzASYzJIGLGcZGxL93WA7z57Yh3G?usp=sharing
    徐仕翰02-25 13:57:https://colab.research.google.com/drive/19a06Opu-J_E1WV2e2he6umRFIejoayZp?hl=zh-tw
    石淑份02-25 13:59:https://colab.research.google.com/drive/19awzk2xHPBi1TCF4F56Ok114HapUoH4P?usp=sharing
    許嘉惠02-25 13:59:作業3https://colab.research.google.com/drive/1DROepXSzirQR7R5iQjBKrhCIGKG3jI3g?usp=sharing
    石淑份02-25 14:00:https://colab.research.google.com/drive/1zeHvY023IkNMnN5f-Kca7CCfooLLDk8y?usp=sharing
    葉峻劭03-10 12:22:https://colab.research.google.com/drive/15NphPnM7RogAemblHSFpMLoh9H32p07c?hl=zh-tw
    03-10 13:42:繳交作業 3 https://colab.research.google.com/drive/1bTNCIbkE-NGet0Csq6eIsMvLDML-bALg?usp=sharing
    葉峻劭03-10 13:44:https://colab.research.google.com/drive/12JAR5X0WYpzM5hkD3X0jpxSV_QY5bM8X
    葉峻劭03-10 13:45:https://colab.research.google.com/drive/12JAR5X0WYpzM5hkD3X0jpxSV_QY5bM8X
    游學宇03-10 13:45:繳交作業3https://colab.research.google.com/drive/1iJg16mow1hbpfxIWlEmPgEIRJkz5uclZ?usp=sharing
    高宥宏03-10 13:46:繳交作業3 https://colab.research.google.com/drive/14GvX6fiX5euKk1or0ONmbDk1QgUuXoU4?usp=sharing
    張立翰03-10 13:46:https://colab.research.google.com/#scrollTo=T1mSNxOYoJEB
    賴秀玲03-10 13:46:https://colab.research.google.com/drive/1KCTScdN-kl0fAHfQOYRZfTI-xNatJD0U?hl=zh-tw#scrollTo=K1uNUul5uSJd&uniqifier=5
    林盈君03-10 13:47:https://colab.research.google.com/drive/1COx1itKWEfpMwyZxR83z4pDkOMeuwUhW?usp=sharing
    陳玉蓮03-10 13:47:https://colab.research.google.com/drive/1e_z6HJl4Iteaa_rD4aObpuktSmCQT6j4
    陳玉香03-10 13:48:https://colab.research.google.com/drive/1DqGxhCx-wA0wDObB6lERhgF0tvh0s_vW?usp=sharing
    陳清山03-10 13:48:https://colab.research.google.com/drive/1G8VEAaA9QwMDS1SENWCss8xe8yiKnsY9?usp=sharing
    03-10 13:48:繳交作業 https://colab.research.google.com/drive/1c_JuICRIeFVuH8XART-vmLBw0SsoZTCI?usp=sharing
    許嘉惠03-10 13:49:留言...
    林振均03-10 13:49:https://colab.research.google.com/drive/1efnnHLvsnK2S-pIg4M6x19osZ298aojk?usp=sharing
    王美英03-10 13:49:https://colab.research.google.com/drive/1hJci8QSehray_GmHSXBX8bUOUOh8xX-K#scrollTo=XQBwObmM138m&line=3&uniqifier=1
    石淑份03-10 13:49:https://colab.research.google.com/drive/1zeHvY023IkNMnN5f-Kca7CCfooLLDk8y?usp=sharing
    許嘉惠03-10 13:50:留言...https://colab.research.google.com/drive/1R0uWDUV3jTeCwNxLu1N5Dv2_DtVN80xB?usp=sharing
    賀百福03-10 13:51:繳交作業3https://colab.research.google.com/drive/1qpBtDA-fMJwAU0ZwYf5CtjHv1iHS39QY?usp=sharing
    洪素嬌03-10 13:55:https://colab.research.google.com/drive/1jw5yKUKBbMXn1IPoXja7sAYJk2eY7_Qb
    林韋均03-10 13:56:https://colab.research.google.com/drive/1SBenaT5Xj4iJKbcPBEJDJc55rkcJmV7M?usp=sharing
    周于純03-10 14:00:https://colab.research.google.com/drive/1bLm0wJI76AxC1BOaO5urN3iZdmlH_dkj
    林振均03-16 12:52:https://colab.research.google.com/drive/1bQd2HKFTKKP-o-l-U7ZWJvnMVZEqV3DI?usp=sharing 上次繳錯了
    黃林賢03-17 12:04:https://colab.research.google.com/drive/1s_Qb7ZvXrpaCtruTJWHCoUtYXjiXh49K?usp=sharing (補繳3/10作業)
    藍基元03-25 20:35:https://colab.research.google.com/drive/1EM2MyqgksSLpqQlFkFs6k-PU4t1qisDf?usp=sharing (補交3/10作業)
    03-31 09:06:How To Become A Blockchain Developer In 2023? https://www.youtube.com/watch?v=lg5ikF8k6yc
    03-31 09:08:Blockchain Technology Simply Explained (2023) https://www.youtube.com/watch?v=QJn28fFKUR0
    03-31 09:23:什麼是區塊鏈blockchain? ~~~淺談 區塊鏈的未來發展和應用 (2023, 01'49") https://www.youtube.com/watch?v=KnUpGADFSt4
    03-31 09:28:台灣金融研訓院 TABF Channel Cheap教你金融科技力 (3~4 mins) https://www.youtube.com/playlist?list=PL9NZYNTi48oAD6_uj2aNLK4zFmpKZ5sxj
    林振均04-21 13:27:https://colab.research.google.com/drive/1bQd2HKFTKKP-o-l-U7ZWJvnMVZEqV3DI?usp=sharing之前的作業連結失效
    登入帳號密碼代表遵守學術網路規範


    文章分類 Labels


    最新文章 Top10

    中華科技大學數位化學習歷程 - 意見反應