Professional Documents
Culture Documents
Bbit Exam3
Bbit Exam3
Bbit Exam3
<html>
<body>
<script type="text/javascript">
var i=0
for (i=0;i<=10;i++)
document.write("<br />")
</script>
</body>
<html>
b) Using the table below as a guide for grading, write a JavaScript program to grade student
marks for a single subject, using;
Marks Grade
0-39 F
40-49 D
50-59 C
60-69 B
70-100 A
KCA UNIVERSITY
DEPARTMENTS
4. BBIT 4. CCNA
a) Write a JavaScript that display the first ten positive integers in ascending order using:
i. a while loop that display the first ten positive integers in ascending order [3 Marks]
ii. a for loop that display the first ten positive integers in ascending order [3 Marks]
b) Write HTML code that creates a form asking for the details listed below: [3 Marks]
Full Name
Address
Post-code
Phone Contact
c) Radio buttons are often used on questionnaires to indicate a person's opinion, or their
likes and dislikes. They can also be used for 'yes' or 'no' responses. Write codes that utilize radio
buttons to get information from the question “Do you agree that the Earth orbits the Sun?”, with
optional response as follows: [3Marks]
Strongly Agree
Agree
Disagree
Strongly disagree
d) Create an html page with the following specifications; Title should be about NAIROBI
CITY, Place the City name at the top of the page in large text and in blue color, Add names of
landmarks KICC, UHURU PARK, KENCOME, RAILWAYS, and KCA UNIVERSITY-TOWN
CAMPUS in different color, style and typeface. The name KCA UNIVERSITY should be
blinking . Add scrolling text with a message of reading “WELCOME TO NAIROBI”.
[5 Marks]
e) Write a HTML code to generate following output: [2 Marks]
1. Chapter One
a. Section One
b. Section Two
c. Section Three
2. Chapter Two
3. Chapter Three