Skip to content

Commit 29f33a6

Browse files
committed
2 parents b33628b + ed27954 commit 29f33a6

28 files changed

+3082
-98
lines changed

src/lab/exp1/Quizzes.html

Lines changed: 168 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<title>Welcome to Virtual Labs - A MHRD Govt of india Initiative</title>
1212

1313
<link rel="shortcut icon" href="../images/favicon.ico">
14-
14+
<script type="text/javascript" src = 'quiz.js'></script>
1515

1616
<link href="../css/bootstrap.min.css" rel="stylesheet">
1717

@@ -25,6 +25,37 @@
2525
<link href="../css/style.css" rel="stylesheet">
2626
<script type="text/javascript" src = 'tabs.js'></script>
2727
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-67020197-1', 'auto');ga('send', 'pageview');</script>
28+
29+
30+
<style>
31+
.qheader{
32+
font:bold 14px Arial;
33+
}
34+
35+
.qselections{
36+
font:normal 13px Arial;
37+
}
38+
</style>
39+
40+
<script src="quizconfig.js">
41+
</script>
42+
43+
<script>
44+
45+
/***********************************************
46+
* JavaScriptKit.com Multiple Choice Quiz Script (http://www.javascriptkit.com)
47+
* Copyright 2003 JavaScript Kit- http://www.javascriptkit.com
48+
* This notice and footnote must stay intact for use
49+
* Visit JavaScript Kit (http://www.javascriptkit.com/) for full source code
50+
***********************************************/
51+
52+
var actualchoices=new Array()
53+
document.cookie="ready=yes"
54+
</script>
55+
56+
57+
58+
2859
</head>
2960
<body id="page-top" class="index">
3061
<div id="top">
@@ -93,14 +124,19 @@ <h2 class="text-h2-lightblue" style=" margin-bottom: 20px; margin-top: 10px; "><
93124
<div class="row">
94125
<div class="col-md-2 sidebar-col-2">
95126
<!--edit1-->
96-
<a href="Introduction.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Introduction</h3></a><a href="Theory.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Theory</h3></a><a href="Objective.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Objective</h3></a><a href="Experiment.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Experiment</h3></a><a href="Manual.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Manual</h3></a><a href="Quizzes.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Quizzes</h3></a><a href="http://feedback.vlabs.ac.in/" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;"></h3></a> </div>
127+
<a href="Introduction.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Introduction</h3></a><a href="Theory.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Theory</h3></a><a href="Objective.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Objective</h3></a><a href="Experiment.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Experiment</h3></a><a href="Manual.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Manual</h3></a><a href="Quizzes.html?domain=Computer Science&lab=Problem Solving Lab" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;">Quizzes</h3></a><a href="http://feedback.vlabs.ac.in/" class="sidebar-a" > <h3 class="text-h3-darkblue" style="margin-top: 2px;"></h3></a> </div>
97128

98-
<div class="col-md-10 lab-list-col-10">
129+
130+
131+
132+
133+
134+
<div class="col-md-10 lab-list-col-10">
99135

100136
<!--edit -->
101137
<h1 class="text-h2-lightblue">Numerical Representation</h1><div class="content" id="experiment-article-section-6-content">
102138
<p>
103-
<form action="quizresults.php" method="post" name="quiz" onsubmit='return window.confirm("You are submitting information to an external page. \nAre you sure?");' target="_blank">
139+
<!-- <form method="post" name="quiz" onsubmit='evaluate()' target="_blank">
104140
<ol>
105141
<li><b>1. The execution of a loop typically starts with: </b></li>
106142
<input name="Q1" type="radio" value="1">initialization statements<br>
@@ -151,8 +187,132 @@ <h1 class="text-h2-lightblue">Numerical Representation</h1><div class="content"
151187
<br>
152188
</br></input></br></input></br></input></br></input></br></br></input></br></input></br></input></br></input></br></br></input></br></input></br></input></br></input></br></br></input></br></input></br></input></br></input></br></br></input></br></input></br></input></br></input></ol>
153189
<br>
154-
<p> <input target="_blank" type="submit" value="Submit answers for evaluation"/></p>
155-
</br></form>
190+
<p> <button type="submit" onclick="evaluate()">Submit answers for evaluation</button></p>
191+
</br></form> -->
192+
193+
194+
195+
<form method="POST" name="myquiz">
196+
197+
<!-- <font face="Arial"><big><big>General Knowledge Quiz</big></big></font></p> -->
198+
199+
<div class="qheader">
200+
1. The execution of a loop typically starts with: </div>
201+
<div class="qselections">
202+
<input type="radio" value="a" name="question1">a) initialization statements<br>
203+
<input type="radio" value="b" name="question1">b) Loop body<br>
204+
<input type="radio" value="c" name="question1">c) test condition<br>
205+
<input type="radio" value="d" name="question1">d) update statements<br>
206+
</div>
207+
208+
<br>
209+
210+
<div class="qheader">
211+
2) The break statement is used to exit from:</div>
212+
<div class="qselections">
213+
<input type="radio" value="a" name="question2">a) an if statement<br>
214+
<input type="radio" value="b" name="question2">b) a for loop<br>
215+
<input type="radio" value="c" name="question2">c) a program<br>
216+
<input type="radio" value="d" name="question2">d) the main( ) function<br>
217+
</div>
218+
219+
<br>
220+
221+
<div class="qheader">
222+
3) A do-while loop is useful when we want that the statements within the loop must be executed</div>
223+
<div class="qselections">
224+
<input type="radio" value="a" name="question3">a) only once<br>
225+
<input type="radio" value="b" name="question3">b) At Least Once<br>
226+
<input type="radio" value="c" name="question3">c) More than once<br>
227+
<input type="radio" value="d" name="question3">d) None of the above<br>
228+
</div>
229+
230+
<br>
231+
232+
<div class="qheader">
233+
4) In what sequence the initialization, testing and execution of body is done in a do-while loop </div>
234+
<div class="qselections">
235+
<input type="radio" value="a" name="question4">a) Initialization, execution of body, testing<br>
236+
<input type="radio" value="b" name="question4">b) Execution of body, initialization, testing<br>
237+
<input type="radio" value="c" name="question4">c) Initialization, testing, execution of body<br>
238+
<input type="radio" value="d" name="question4">d) None of the above<br>
239+
</div>
240+
241+
<br>
242+
243+
<div class="qheader">
244+
5) Which looping process checks the test condition at the end of the loop?</div>
245+
<div class="qselections">
246+
<input type="radio" value="a" name="question5">a) for<br>
247+
<input type="radio" value="b" name="question5">b) while<br>
248+
<input type="radio" value="c" name="question5">c) do-while<br>
249+
<input type="radio" value="d" name="question5">d) No looping peocess check condition at the end<br>
250+
</div>
251+
252+
<br>
253+
254+
<div class="qheader">
255+
6) A continue statement causes execution to skip to: </div>
256+
<div class="qselections">
257+
<input type="radio" value="a" name="question6">a) the end of the program<br>
258+
<input type="radio" value="b" name="question6">b) the first statement after the loop<br>
259+
<input type="radio" value="c" name="question6">c) the statement following the continue statement<br>
260+
<input type="radio" value="d" name="question6">d) the next iteration of the loop<br>
261+
</div>
262+
263+
<br>
264+
265+
<div class="qheader">
266+
7) The statement i++; is equivalent to: </div>
267+
<div class="qselections">
268+
<input type="radio" value="a" name="question7">a) <code>i = i + i;</code><br>
269+
<input type="radio" value="b" name="question7">b) <code>i = i + 1;</code><br>
270+
<input type="radio" value="c" name="question7">c) <code>i = i - 1;</code><br>
271+
<input type="radio" value="d" name="question7">d) <code> i - - ;</code><br>
272+
</div>
273+
274+
<br>
275+
276+
<div class="qheader">
277+
8) Another word for "looping" is: </div>
278+
<div class="qselections">
279+
<input type="radio" value="a" name="question8">a) recapitulation <br>
280+
<input type="radio" value="b" name="question8">b) tintinabulation <br>
281+
<input type="radio" value="c" name="question8">c) iteration<br>
282+
<input type="radio" value="d" name="question8">d) reiteration<br>
283+
</div>
284+
285+
<br>
286+
287+
<div class="qheader">
288+
9) Which looping process is best used when the number of iterations is known?</div>
289+
<div class="qselections">
290+
<input type="radio" value="a" name="question9">a) for<br>
291+
<input type="radio" value="b" name="question9">b) while<br>
292+
<input type="radio" value="c" name="question9">c) do-while<br>
293+
<input type="radio" value="d" name="question9">d) all of the above<br>
294+
</div>
295+
296+
<br>
297+
298+
<div class="qheader">
299+
10) Which of the following is not an infinite loop.</div>
300+
<div class="qselections">
301+
<input type="radio" value="a" name="question10">a) <code>int i = 1 ; while ( 1 ) { i++ ;
302+
} </code><br>
303+
<input type="radio" value="b" name="question10">b) <code>for( int i =1; i &lt; 10 ; i--) printf("Hello World");</code><br>
304+
<input type="radio" value="c" name="question10">c) <code>for(int i =1; i&lt;100; i++) printf("Hello World");</code><br>
305+
<input type="radio" value="d" name="question10">d) <code>int i = 0; do{ i-- printf("%d ",i); }while(i&gt;0);</code><br>
306+
307+
</div>
308+
309+
</form>
310+
311+
<form>
312+
<div align="center">
313+
<input type="button" value="Grade Me!" name="B1" onClick="gradeit()"> <input type="button" value="Reset" name="B2" onClick="document.myquiz.reset()"></div>
314+
</form>
315+
156316
</p>
157317
</div> </div>
158318
</div>
@@ -209,6 +369,8 @@ <h2 class="text-h2-lightblue-small" style="font-weight: bold;margin-top: 0px;">
209369

210370
</div> <!-- top div -->
211371

372+
373+
212374
</body>
213375

214376

src/lab/exp1/popquiz.htm

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
<html>
2+
3+
<head>
4+
<title>JavaScriptKit.com Multiple Choice Quiz Script</title>
5+
6+
<style>
7+
.qheader{
8+
font:bold 14px Arial;
9+
}
10+
11+
.qselections{
12+
font:normal 13px Arial;
13+
}
14+
</style>
15+
16+
<script src="quizconfig.js">
17+
</script>
18+
19+
<script>
20+
21+
/***********************************************
22+
* JavaScriptKit.com Multiple Choice Quiz Script (http://www.javascriptkit.com)
23+
* Copyright 2003 JavaScript Kit- http://www.javascriptkit.com
24+
* This notice and footnote must stay intact for use
25+
* Visit JavaScript Kit (http://www.javascriptkit.com/) for full source code
26+
***********************************************/
27+
28+
var actualchoices=new Array()
29+
document.cookie="ready=yes"
30+
</script>
31+
32+
</head>
33+
34+
<body bgcolor="#FFFFFF">
35+
36+
<!--Comments on configuring quiz script-->
37+
<!--Change the questions below any way you want, but make note of the following:-->
38+
<!--1) Perserve the <FORM> tags -->
39+
<!--2a) Inside each radio button, use the VALUE attribute to denote each question's choices: "a", "b", "c" etc.-->
40+
<!--2b) Inside each radio button, use the NAME attribute to denote which question the button belongs to ("question1", "question2" etc-->
41+
<!--3) Script supports unlmited # of questions. Be sure to edit .js file to enter corresponding solutions-->
42+
43+
<p align="center">
44+
45+
<form method="POST" name="myquiz">
46+
47+
<font face="Arial"><big><big>General Knowledge Quiz</big></big></font></p>
48+
49+
<div class="qheader">
50+
1) A do-while loop is useful when we want that the statements within the loop must be executed</div>
51+
<div class="qselections">
52+
<input type="radio" value="a" name="question1">a) aaa.<br>
53+
<input type="radio" value="b" name="question1">b) bbb<br>
54+
<input type="radio" value="c" name="question1">c) cc<br>
55+
<input type="radio" value="d" name="question1">d) dd<br>
56+
</div>
57+
58+
<br>
59+
60+
<div class="qheader">
61+
2) What is the world's most common religion?</div>
62+
<div class="qselections">
63+
<input type="radio" value="a" name="question2">a) Christianity<br>
64+
<input type="radio" value="b" name="question2">b) Buddhism<br>
65+
<input type="radio" value="c" name="question2">c) Hinduism<br>
66+
<input type="radio" value="d" name="question2">d) Muslim<br>
67+
</div>
68+
69+
<br>
70+
71+
<div class="qheader">
72+
3) Which city ranks as the world's most populous city (2002)?</div>
73+
<div class="qselections">
74+
<input type="radio" value="a" name="question3">a) New York (US)<br>
75+
<input type="radio" value="b" name="question3">b) Mexico City (Mexico)<br>
76+
<input type="radio" value="c" name="question3">c) Tokyo (Japan)<br>
77+
<input type="radio" value="d" name="question3">d) Shanghai (China)<br>
78+
</div>
79+
80+
<br>
81+
82+
<div class="qheader">
83+
4) What is the second largest country (in size) in the world?</div>
84+
<div class="qselections">
85+
<input type="radio" value="a" name="question4">a) USA<br>
86+
<input type="radio" value="b" name="question4">b) China<br>
87+
<input type="radio" value="c" name="question4">c) Canada<br>
88+
<input type="radio" value="d" name="question4">d) Russia<br>
89+
</div>
90+
91+
<br>
92+
93+
<div class="qheader">
94+
5) As of January 2003, how much is Microsoft Chairman Bill Gates's net worth?</div>
95+
<div class="qselections">
96+
<input type="radio" value="a" name="question5">a) 10 million US<br>
97+
<input type="radio" value="b" name="question5">b) 10 billion US<br>
98+
<input type="radio" value="c" name="question5">c) 35 billion US<br>
99+
<input type="radio" value="d" name="question5">d) 50 billion US<br>
100+
</div>
101+
102+
<br>
103+
104+
<div class="qheader">
105+
6) Which country below is not one of the members of the UN security council (Jan 2003)?</div>
106+
<div class="qselections">
107+
<input type="radio" value="a" name="question6">a) USA<br>
108+
<input type="radio" value="b" name="question6">b) China<br>
109+
<input type="radio" value="c" name="question6">c) Germany<br>
110+
<input type="radio" value="d" name="question6">d) France<br>
111+
</div>
112+
113+
<br>
114+
115+
<div class="qheader">
116+
7) The longest river in the world is:</div>
117+
<div class="qselections">
118+
<input type="radio" value="a" name="question7">a) Amazon (Brazil)<br>
119+
<input type="radio" value="b" name="question7">b) Nile (Egypt)<br>
120+
<input type="radio" value="c" name="question7">c) Yangtze (China)<br>
121+
<input type="radio" value="d" name="question7">d) Congo (Zaire)<br>
122+
</div>
123+
124+
<br>
125+
126+
<div class="qheader">
127+
8) Which software firm is the second largest in the world, after Microsoft?</div>
128+
<div class="qselections">
129+
<input type="radio" value="a" name="question8">a) Netscape<br>
130+
131+
<input type="radio" value="b" name="question8">b) Oracle<br>
132+
<input type="radio" value="c" name="question8">c) Lotus<br>
133+
<input type="radio" value="d" name="question8">d) Norton<br>
134+
</div>
135+
136+
<br>
137+
138+
<div class="qheader">
139+
9) What's the world's most widely spoken language?</div>
140+
<div class="qselections">
141+
<input type="radio" value="a" name="question9">a) English<br>
142+
<input type="radio" value="b" name="question9">b) Spanish<br>
143+
<input type="radio" value="c" name="question9">c) Mandarin<br>
144+
<input type="radio" value="d" name="question9">d) French<br>
145+
</div>
146+
147+
<br>
148+
149+
<div class="qheader">
150+
10) Which continent is host to the most countries in the world?</div>
151+
<div class="qselections">
152+
<input type="radio" value="a" name="question10">a) Asia<br>
153+
<input type="radio" value="b" name="question10">b) Africa<br>
154+
<input type="radio" value="c" name="question10">c) Europe<br>
155+
</div>
156+
157+
</form>
158+
159+
<form>
160+
<div align="center">
161+
<input type="button" value="Grade Me!" name="B1" onClick="gradeit()"> <input type="button" value="Reset" name="B2" onClick="document.myquiz.reset()"></div>
162+
</form>
163+
164+
<p id="footnote" align="center"><font face="arial" size="-1">Quiz script provided by<br>
165+
<a href="http://www.javascriptkit.com">JavaScriptKit.com</a></font></p>
166+
</body>
167+
</html>

0 commit comments

Comments
 (0)