s40923224 cp2020

  • Home
    • Site Map
    • reveal
    • blog
  • 首頁
  • HW1
    • IPv4 與 IPv6 地址
      • Overview 總覽-1
      • TCP and IP TCP與IP
      • IPv4 and IPv6 Addresses IPv4 與 IPv6 位址
      • IPv4 Addressing IPv4 位址
      • Addressing Notation 尋址符號
      • Network and Host Addresses 網絡和主機地址
      • IPv4 Address Classes IPv4地址類別
      • IPv4 Data Flows IPv4數據流
      • Assigning an IP Address 分配IP地址
      • Benefits of IPv6 IPv6的好處
      • IPv6 Address Structure IPv6地址結構
      • IPv6 Data Flows IPv6數據流
    • TCP 與 UDP 協議
      • Overview 總覽-2
      • TCP and UDP TCP與UDP
      • TCP Vs. UDP
      • TCP Windowing TCP窗口
      • Networking Transfer Protocols 網絡傳輸協議
  • HW2
  • HW3
    • Concepts 概念
    • MAX OF THREE 最多三人
    • Tic Tac Toe Game 井字遊戲
  • 心得
  • 自評分數60
Networking Transfer Protocols 網絡傳輸協議 << Previous Next >> HW3

HW2

#先import urllib.request 然後抓取網址
import urllib.request
target_url = "https://nfulist.herokuapp.com/?semester=1091&courseno=0776"
#建立數列
cp1b = []
#將資料用append語法cp1b放進中 decode("utf-8")可解讀中文 
for line in urllib.request.urlopen(target_url):
    cp1b.append(int(line.decode('utf-8').rstrip()))
在random模組 載入亂數分組模組shuffle
from random import shuffle
shuffle(cp1b)
n = 5
m = int(len(cp1b)/n)
list2 = []
for i in range(0,len(cp1b),m):
    list2.append(cp1b[i:i+m])
print(list2)

 


Networking Transfer Protocols 網絡傳輸協議 << Previous Next >> HW3

Copyright © All rights reserved | This template is made with by Colorlib