國立暨南國際大學 103 學年度第一學期小考試卷

科目名稱:計算機概 論 開課系所:資訊工程 學系 考試日期 2014.12.16
系所別:
年級:
學號:
姓名:
考試時間 14:20-14:35
  1. (10%) Draw the top level of a structure chart for a program having the following main function.

    def main():
        printIntro()
        length, width = getDimensions()
        amtNeeded = computeAmount(length, width)
        printReport(length, width, amtNeeded)







  2. (10%) Which expression is true approximately 66% of the time?
    1. random() >= 66
    2. random() <  0.66
    3. random() <  66
    4. random() >= 0.66


  3. (10%) In the racqetball simulation, what data type is returned by the gameOver() function?
    1. bool
    2. int
    3. string
    4. float