40923107 cp2020

  • Home
    • Site Map
    • reveal
    • blog
  • About
    • Develop
  • Website
  • HW1
    • Pc Hardware
      • PCH 4 Cases, Form Factors, and Power Supplies(外殼,外形尺寸和電源)(P.37~P.41)
      • Computer Cases 電腦機箱 (P.38)
      • Power Supplies 電源 (P.39)
      • Power Supply Connectors 電源連接器(P.40)
      • Remove A Power Supply 卸下電源(P.41)
      • PCH 5 Motherboards, Expansion Buses, and Processors (主板,擴展總線和處理器)(P.42~47)
      • Motherboards and Components 主板和組件 (P.43)
      • Expansion Slots 擴展插槽 (P.44)
      • Jumpers 跳線 (P.45)
      • Processor History 處理器歷史 (P.46)
      • Virtualization 虛擬化 (P.47)
      • CPU Cooling (CPU散熱) (P.48)
  • HW2
  • HW3
    • 10:List Overlap Comprehensions  列表重疊理解
    • 11:Check Primality Functions 檢查基本功能
    • 12:List Ends 清單結尾
CPU Cooling (CPU散熱) (P.48) << Previous Next >> HW3

HW2

# use "python read url file data" search"
# get "https://stackoverflow.com/questions/1393324/given-a-url-to-a-text-file-what-is-the-simplest-way-to-read-the-contents-of-the"
# since we use python 3 therefore try to use the following script to get cp1a list
import urllib.request  # the lib that handles the url stuff
target_url = "https://nfulist.herokuapp.com/?semester=1091&courseno=0762"
cp1a = []
for line in urllib.request.urlopen(target_url):
    cp1a.append(line.decode('utf-8'))
    #print(line.decode('utf-8'), end = "") #utf-8 or iso8859-1 or whatever the page encoding scheme is
print(cp1a)
# need to chop \n for each line


CPU Cooling (CPU散熱) (P.48) << Previous Next >> HW3

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