Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Computers -1 st exam- 授課教授 : 李錫智 教授.

Similar presentations


Presentation on theme: "Introduction to Computers -1 st exam- 授課教授 : 李錫智 教授."— Presentation transcript:

1 Introduction to Computers -1 st exam- 授課教授 : 李錫智 教授

2 第一題

3 第二題 Please give two advantages that networking can provide. Ans: (1) 資料可分散式處理 (2) 容錯,走不同的路徑 第三題 Why a message is broken into packets at the sender and the packets are reassembled in the receiver end? Please give at least two advantages. Ans: (1) 大家可以公平地傳輸,不會被大的 message 擋住 (2) 一小部分出錯,不用全部重送

4 第四題 What is the content of V in each case: (a) V = 20 + 12 + “ I love NSYSU”; (b) V = 20 + “ I love NSYSU ” + 12; (c) V = “I love NSYSU “ + 20 + 12; (d) V = “I love NSYSU “ + (20 + 12); (e) V = “” + 20 + 12 + “ I love NSYSU”; Ans: (a)32 I love NSYSU (b)20 I love NSYSU 12 (c) I love NSYSU 2012 (d) I love NSYSU 32 (e)2012 I love NSYSU

5 第五題 Suppose the speed of instruction execution is proportional to the clock rate of the CPU. If a program is run by a 1.5GHz CPU in 30 minutes, how soon will it be run by a 7.5GHz CPU? Ans: 30/5 = 6 minutes

6 第六題 What does the following web page look like on the screen? How Great is HTML Hello! EE-NSYSU http://www.ee.nsysu.edu.tw Freshmen 90 Sophomore 91 Junior 92 Senior 93 How wonderful the department is!

7 第六題 ( 答案 ) Ans:

8 第七題 Write a web page to show the following table on the screen. XXXX1.Monday 2.Tuesday YYYYY AABBBCCCCC Html Javascript DDDDa.Chinese b.Physics

9 第七題 ( 答案 ) XXXX Monday Tuesday YYYYY AA BBB CCCCC Html Javascript DDDD Chinese Physics Ans:

10 第八題 Create a web page that can be used to compute a student’s overall average for a course. Your page should prompt the user to enter his or her homework score, test 1 score, test 2 score, test 3 score, and test 4 score, and show the information on the screen as indicated below (Note that the number of tests and the number of homework should be stored in variables in your program): Homework score: 90 Test 1 score: 80 Test 2 score: 90 Test 3 score: 80 Test 4 score: 90 Number of homework: 1 Number of tests: 4

11 第八題 ( 答案 ) h=0,t=0; homework=prompt("Homework score",""); h=h+1; text1=prompt("text1",""); t=t+1; text2=prompt("text2",""); t=t+1; text3=prompt("text3",""); t=t+1; text4=prompt("text4",""); t=t+1; Ans:

12 第八題 ( 答案 ) document.write("Homework score:"+homework+" "); document.write("Text1 score: "+text1+" "); document.write("Text2 score: "+text2+" "); document.write("Text3 score: "+text3+" "); document.write("Text4 score: "+text4+" "); document.write(" "); document.write("Number of homework: "+h+“ "); document.write("Number of tests: "+t);

13 第九題 What does the following web page look like on the screen after execution (Suppose the user types in 37)? Compute Square Var = prompt(“Enter the input:”, “”); document.write(“ ”); document.write(“The double of the input is: “ + (Var + Var)); document.write(“ ”);

14 第九題 ( 答案 ) Ans:

15 第十題 Please write a web page which will prompt the user to collect his/her information and show the following on the user’s screen: Hello xxx! How are you today? Your personal data are: bbbbName: xxx bbbbSex: ss bbbbAge: aa where xxx denotes the input for the user’s name, ss denotes the input for the user’s sex (Male or Female), and aa denotes the input for the user’s age. Note that bbbb indicates a space of four blanks.

16 第十題 ( 答案 ) name=prompt("What’s your name?",""); sex=prompt("What’s your sex?",""); age=prompt("What’s your age?",""); document.write("Hello "+name+"!"+" How are you today?"+" "); document.write("Your personal data are: "+" "); document.write(" Name: "+name+" "); document.write(" Sex: "+sex+" "); document.write(" Age: "+age+" "); Ans:


Download ppt "Introduction to Computers -1 st exam- 授課教授 : 李錫智 教授."

Similar presentations


Ads by Google