SlideShare a Scribd company logo
1 of 6
Download to read offline
Page 1 / 6
M150A
Tutor-marked Assignment 1 - Fall 2010
Cut-off date: November 28, 2010
This TMA should be submitted to your tutor electronically through the LMS system
before the cut-off date indicated at the beginning of the TMA.
You should write your solutions to the questions in a single word document. Head the
document with your name and your Personal Identifier.
This TMA assesses your understanding of Units 1, 2, 6 and 7 of M150.
It consists of 5 quesƟons. The total marks for each quesƟon are shown at the beginning
of each question. The marks allocated to each part of a question are indicated in the
margin.
You should be able to answer the questions of this TMA once you have completed the
units each question covers:
QuesƟon 1: Unit 1
QuesƟon 2: Unit 2
QuesƟon 3: Unit 6
QuesƟon 4: Unit 7
QuesƟon 5: Unit 7
Arab Open University
Faculty of Computer Studies
M150 Data, compuƟng and informaƟon
Page 2 / 6
QuesƟon 1 [10 marks]
1. Read secƟon 8.2 of the M150 course companion (You should have had a copy of
it with the course material and you can also view a soft copy of it in the course
CD ROM 11). [4]
a. Briefly define the two terms syndication and plagiarism.
b. How can you avoid syndication and plagiarism when writing your TMAs?
2. Computers are tools for finding. Explain this with examples. [2]
3. What two advices can you give for people who make online shopping? [4]
Question 2 [10 marks]
1. People are using computers to communicate with other people. [5]
a. Explain how computers are extending human to human communication
with examples.
b. Define the term Netiquette.
c. Go to the following URI and make the online quiz about Netiquettes:
http://www.albion.com/netiquette/netiquiz.html.
Based on what you’ve learned from the quiz, answer the following
questions:
• What must you do before you post in a discussion group such as
the discussion forum in your LMS system?
• What’s the importance of knowing the Netiquettes?
• What is the Golden Rule of Netiquette?
2. Representations play a central role in facilitating communication by establishing
a relationship between some form and some meaningful content subject to
some convention; mention the two conditions for effective representation. [2]
3. From your understanding of the term “complex representation”, briefly explain
how does implementing them help in creating and interpreting new traffic signs?
[3]
Question 3 [25 marks]
1. Programs written in high-level languages need to be translated into machine
language before being processed. Mention two different mechanisms for doing
this translation process. Give examples of programming languages for each one
of them. [4]
2. What is an operating system? What functions it does? Give two examples of an
old text-based operating system and a new one. [4]
3. The following flowchart diagram shows a loop structure problem: [11]
Page 3 / 6
a) From the diagram, specify:
The condition, the loop body, and any instruction(s) that is (are) not in
the loop body.
b) Complete the following simple tracing table for the diagram in figure 1.
You may provide an alternative table that shows that you’ve traced the
diagram above.
number (number is 0)
NOT
(number is 0)
Go into
the loop??
Iteration
number
number output
12 False True Yes 1 9 12
.
.
.
No (Stop)
c) How many times will the loop body be executed?
d) What is the output after these instructions have been executed?
e) What do you expect to happen if the statement (decrement number by 3)
is replaced by (increment number by 2)? Why?
Page 4 / 6
4. Truth tables can be used to show whether or not two Boolean expressions are
equivalent. Complete the truth tables given below to show that: [6]
NOT (A OR B) is not equivalent to NOT A OR NOT B
Make sure that you end your answer with a proper conclusion.
A B (A OR B) NOT (A OR B)
True True
True False
False True
False False
A B NOT A NOT B NOT A OR NOT B
True True
True False
False True
False False
Question 4 [25 marks]
1. Write JavaScript code equivalent to the flowchart shown in Figure 1 in QuesƟon
3 above. [7]
2. Trace the following JavaScript code and specify the output: [6]
a. var aString = 'M150';
for ( var i = 0; i < aString.length; i = i +1 )
{
document.write(aString.charAt(i) + '<BR>');
}
b. var x = 0, y = 0;
for(var i=0; i <= 5; i++)
{
x = x + 1;
y = y + x;
}
document.write(x,y);
c. var x = 100;
if ((x >= 0) && (x!= 100))
x = x * 10
else
x = x * 20;
document.write(x);
Page 5 / 6
3. The following JavaScript codes will not work or will not produce the expected
output. Find the errors/mistakes in these JavaScript codes, and then rewrite
them after correction. [6]
a. var age;
age = window.prompt('Please enter your age','');
age = 20 + year;
document.write('After 20 years you will be '+age + '
Years old');
b. var moneyAmount, zakat;
zakat = moneyAmount * 2.5 /100;
document.write ('The zakat of your money is: ' + zakat
+ ' KD');
c. var answer;
answer = window.prompt('Are you enjoying programming
with JavaScript? Yes/No', '');
if ((answer = 'Yes')|| (answer = 'yes'))
{
document.write('Glad to hear that!' + '<BR>');
}
else
{
document.write('You will enjoy it soon with more
practice and patience!' + '<BR>')
}
4. Write JavaScript code to calculate and print the area and the circumference of a
circle as follows: [6]
• Define 3 variables: radius, area and circumference.
• Ask the user to enter the radius of the circle.
• Calculate the area and the circumference of the circle based on the formulas:
area= 3.14 * radius * radius
circumference = 2 * 3.14 * radius
• Print the calculated area and circumference in the output window.
Page 6 / 6
Question 5 [ 30 marks]
1. A social association is making a study on the effect of TV on small children. One
of the things they need in the study is the average number of hours children
spend in watching TV daily.
Taking into consideraƟon a sample of 30 children, write a complete JavaScript
program that reads the number of hours that these children spend in watching
TV in a day, calculate the average and print it in the output window. [12]
2. A new restaurant offers free delivery within a three-mile radius, that is, up to
and including three miles from their location. [15]
For distances over three miles and not exceeding 12 miles, there is a charge of
£1 per extra mile over the first three.
a. Write a complete JavaScript program which will work according to the
following specifications:
• Read the distance in miles from the user.
• If the distance is within three miles(i.e. less than or equals to 3), the
user should be informed that the delivery will be free;
• If the distance is over three miles but not over 12 miles, the user
should be informed what the delivery charge is in pounds. To do this,
you need first to calculate the extra distance. You should store the
value in the variable which is already declared, then use this variable
when you output the message.
• If the distance exceeds 12 miles, the user should be informed that the
company’s maximum delivery distance is 12 miles.
b. Run your program with each of the following inputs:
• 1
• 5
• 15
For each test, insert a screen dump showing the output into your Solution
Document.
Important note: In your answers to both parts 1 and 2 (a) of this
question; you should follow good programming style that helps
readability. This includes: [3]
• Using comments stating the purpose of your program.
• Selecting meaningful variables names.
• Using spacing and indentations to help make the structure of your
program clear.

More Related Content

What's hot

Algorithm Design & Implementation
Algorithm Design & ImplementationAlgorithm Design & Implementation
Algorithm Design & ImplementationGaditek
 
Smu bca-sem-2-fall-2015- solved - assignments
Smu bca-sem-2-fall-2015- solved - assignmentsSmu bca-sem-2-fall-2015- solved - assignments
Smu bca-sem-2-fall-2015- solved - assignmentssmumbahelp
 
End term bscs 2016 fall u et pp1 130516
End term bscs 2016 fall u et pp1 130516End term bscs 2016 fall u et pp1 130516
End term bscs 2016 fall u et pp1 130516ZUbaria Inayat
 
SEM 1 BBA SUMMER DRIVE ASSIGNMENTS
SEM 1 BBA SUMMER DRIVE ASSIGNMENTSSEM 1 BBA SUMMER DRIVE ASSIGNMENTS
SEM 1 BBA SUMMER DRIVE ASSIGNMENTSsolved_assignments
 
Week1 programming challenges
Week1 programming challengesWeek1 programming challenges
Week1 programming challengesDhanu Srikar
 

What's hot (6)

Flow charts week 5 2020 2021
Flow charts week 5 2020  2021Flow charts week 5 2020  2021
Flow charts week 5 2020 2021
 
Algorithm Design & Implementation
Algorithm Design & ImplementationAlgorithm Design & Implementation
Algorithm Design & Implementation
 
Smu bca-sem-2-fall-2015- solved - assignments
Smu bca-sem-2-fall-2015- solved - assignmentsSmu bca-sem-2-fall-2015- solved - assignments
Smu bca-sem-2-fall-2015- solved - assignments
 
End term bscs 2016 fall u et pp1 130516
End term bscs 2016 fall u et pp1 130516End term bscs 2016 fall u et pp1 130516
End term bscs 2016 fall u et pp1 130516
 
SEM 1 BBA SUMMER DRIVE ASSIGNMENTS
SEM 1 BBA SUMMER DRIVE ASSIGNMENTSSEM 1 BBA SUMMER DRIVE ASSIGNMENTS
SEM 1 BBA SUMMER DRIVE ASSIGNMENTS
 
Week1 programming challenges
Week1 programming challengesWeek1 programming challenges
Week1 programming challenges
 

Viewers also liked

Social Networking in BCGA
Social Networking in BCGASocial Networking in BCGA
Social Networking in BCGAAMortenson388
 
Adobe photoshop cs6 새로운기능
Adobe photoshop cs6 새로운기능Adobe photoshop cs6 새로운기능
Adobe photoshop cs6 새로운기능연주 서
 
Enfermeria tecnica
Enfermeria tecnicaEnfermeria tecnica
Enfermeria tecnicablancarosa23
 
Female Sportscasters: Still Battling the Same Barriers
Female Sportscasters: Still Battling the Same BarriersFemale Sportscasters: Still Battling the Same Barriers
Female Sportscasters: Still Battling the Same BarriersKatie Lutz
 
California - Brandon Richards Hist. 141
California - Brandon Richards Hist. 141California - Brandon Richards Hist. 141
California - Brandon Richards Hist. 141Brandon Richards
 
WatchMojo/OnlineVideo-Presentation-JMSB
WatchMojo/OnlineVideo-Presentation-JMSBWatchMojo/OnlineVideo-Presentation-JMSB
WatchMojo/OnlineVideo-Presentation-JMSBAshkan Karbasfrooshan
 
American Colonies: Revolutions
American Colonies: RevolutionsAmerican Colonies: Revolutions
American Colonies: RevolutionsBrandon Richards
 
Teens and prescription drug abuse parent
Teens and prescription drug abuse parentTeens and prescription drug abuse parent
Teens and prescription drug abuse parenttreacca
 

Viewers also liked (13)

Social Networking in BCGA
Social Networking in BCGASocial Networking in BCGA
Social Networking in BCGA
 
Adobe photoshop cs6 새로운기능
Adobe photoshop cs6 새로운기능Adobe photoshop cs6 새로운기능
Adobe photoshop cs6 새로운기능
 
Andersonville - Hist 141
Andersonville - Hist 141Andersonville - Hist 141
Andersonville - Hist 141
 
mining paper
mining papermining paper
mining paper
 
Enfermeria tecnica
Enfermeria tecnicaEnfermeria tecnica
Enfermeria tecnica
 
Female Sportscasters: Still Battling the Same Barriers
Female Sportscasters: Still Battling the Same BarriersFemale Sportscasters: Still Battling the Same Barriers
Female Sportscasters: Still Battling the Same Barriers
 
California - Brandon Richards Hist. 141
California - Brandon Richards Hist. 141California - Brandon Richards Hist. 141
California - Brandon Richards Hist. 141
 
American Colonies
American ColoniesAmerican Colonies
American Colonies
 
California
CaliforniaCalifornia
California
 
WatchMojo/OnlineVideo-Presentation-JMSB
WatchMojo/OnlineVideo-Presentation-JMSBWatchMojo/OnlineVideo-Presentation-JMSB
WatchMojo/OnlineVideo-Presentation-JMSB
 
Nike Power Point MKT 350
Nike Power Point MKT 350Nike Power Point MKT 350
Nike Power Point MKT 350
 
American Colonies: Revolutions
American Colonies: RevolutionsAmerican Colonies: Revolutions
American Colonies: Revolutions
 
Teens and prescription drug abuse parent
Teens and prescription drug abuse parentTeens and prescription drug abuse parent
Teens and prescription drug abuse parent
 

Similar to M150 A Fall2010 T01

CSCI1250 Project 3 Fall 2015 CSCI1250 INTRODUCTIO.docx
CSCI1250    Project 3  Fall 2015  CSCI1250 INTRODUCTIO.docxCSCI1250    Project 3  Fall 2015  CSCI1250 INTRODUCTIO.docx
CSCI1250 Project 3 Fall 2015 CSCI1250 INTRODUCTIO.docxfaithxdunce63732
 
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Alpro
 
Cmis 102 Effective Communication / snaptutorial.com
Cmis 102  Effective Communication / snaptutorial.comCmis 102  Effective Communication / snaptutorial.com
Cmis 102 Effective Communication / snaptutorial.comHarrisGeorg12
 
Question 1Using Powerpoint, Word, Visio or any other graphical e.docx
Question 1Using Powerpoint, Word, Visio or any other graphical e.docxQuestion 1Using Powerpoint, Word, Visio or any other graphical e.docx
Question 1Using Powerpoint, Word, Visio or any other graphical e.docxIRESH3
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingHamad Odhabi
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comStephenson22
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comWilliamsTaylorza48
 
Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docxrosemarybdodson23141
 
Educational courses/tutorialoutlet.com
Educational courses/tutorialoutlet.comEducational courses/tutorialoutlet.com
Educational courses/tutorialoutlet.comCrookstonz
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEWshyamuopeight
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newLast7693
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newscottbrownnn
 
Learning area 5 programming
Learning area 5   programmingLearning area 5   programming
Learning area 5 programmingShuren Lew
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab neweyavagal
 
Mis 589 Success Begins / snaptutorial.com
Mis 589  Success Begins / snaptutorial.comMis 589  Success Begins / snaptutorial.com
Mis 589 Success Begins / snaptutorial.comWilliamsTaylor44
 
Mis 589 Massive Success / snaptutorial.com
Mis 589 Massive Success / snaptutorial.comMis 589 Massive Success / snaptutorial.com
Mis 589 Massive Success / snaptutorial.comStephenson185
 
Networ routingnswitching
Networ routingnswitchingNetwor routingnswitching
Networ routingnswitchingSandeep Ratnam
 
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docx
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docxCOMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docx
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docxdonnajames55
 
Oop lab assignment 01
Oop lab assignment 01Oop lab assignment 01
Oop lab assignment 01Drjilesh
 

Similar to M150 A Fall2010 T01 (20)

CSCI1250 Project 3 Fall 2015 CSCI1250 INTRODUCTIO.docx
CSCI1250    Project 3  Fall 2015  CSCI1250 INTRODUCTIO.docxCSCI1250    Project 3  Fall 2015  CSCI1250 INTRODUCTIO.docx
CSCI1250 Project 3 Fall 2015 CSCI1250 INTRODUCTIO.docx
 
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
 
Mmt 001
Mmt 001Mmt 001
Mmt 001
 
Cmis 102 Effective Communication / snaptutorial.com
Cmis 102  Effective Communication / snaptutorial.comCmis 102  Effective Communication / snaptutorial.com
Cmis 102 Effective Communication / snaptutorial.com
 
Question 1Using Powerpoint, Word, Visio or any other graphical e.docx
Question 1Using Powerpoint, Word, Visio or any other graphical e.docxQuestion 1Using Powerpoint, Word, Visio or any other graphical e.docx
Question 1Using Powerpoint, Word, Visio or any other graphical e.docx
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.com
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.com
 
Name _______________________________ Class time __________.docx
Name _______________________________    Class time __________.docxName _______________________________    Class time __________.docx
Name _______________________________ Class time __________.docx
 
Educational courses/tutorialoutlet.com
Educational courses/tutorialoutlet.comEducational courses/tutorialoutlet.com
Educational courses/tutorialoutlet.com
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Learning area 5 programming
Learning area 5   programmingLearning area 5   programming
Learning area 5 programming
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Mis 589 Success Begins / snaptutorial.com
Mis 589  Success Begins / snaptutorial.comMis 589  Success Begins / snaptutorial.com
Mis 589 Success Begins / snaptutorial.com
 
Mis 589 Massive Success / snaptutorial.com
Mis 589 Massive Success / snaptutorial.comMis 589 Massive Success / snaptutorial.com
Mis 589 Massive Success / snaptutorial.com
 
Networ routingnswitching
Networ routingnswitchingNetwor routingnswitching
Networ routingnswitching
 
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docx
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docxCOMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docx
COMP 2213X2 Assignment #2 Parts A and BDue February 3 in cla.docx
 
Oop lab assignment 01
Oop lab assignment 01Oop lab assignment 01
Oop lab assignment 01
 

Recently uploaded

Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 

M150 A Fall2010 T01

  • 1. Page 1 / 6 M150A Tutor-marked Assignment 1 - Fall 2010 Cut-off date: November 28, 2010 This TMA should be submitted to your tutor electronically through the LMS system before the cut-off date indicated at the beginning of the TMA. You should write your solutions to the questions in a single word document. Head the document with your name and your Personal Identifier. This TMA assesses your understanding of Units 1, 2, 6 and 7 of M150. It consists of 5 quesƟons. The total marks for each quesƟon are shown at the beginning of each question. The marks allocated to each part of a question are indicated in the margin. You should be able to answer the questions of this TMA once you have completed the units each question covers: QuesƟon 1: Unit 1 QuesƟon 2: Unit 2 QuesƟon 3: Unit 6 QuesƟon 4: Unit 7 QuesƟon 5: Unit 7 Arab Open University Faculty of Computer Studies M150 Data, compuƟng and informaƟon
  • 2. Page 2 / 6 QuesƟon 1 [10 marks] 1. Read secƟon 8.2 of the M150 course companion (You should have had a copy of it with the course material and you can also view a soft copy of it in the course CD ROM 11). [4] a. Briefly define the two terms syndication and plagiarism. b. How can you avoid syndication and plagiarism when writing your TMAs? 2. Computers are tools for finding. Explain this with examples. [2] 3. What two advices can you give for people who make online shopping? [4] Question 2 [10 marks] 1. People are using computers to communicate with other people. [5] a. Explain how computers are extending human to human communication with examples. b. Define the term Netiquette. c. Go to the following URI and make the online quiz about Netiquettes: http://www.albion.com/netiquette/netiquiz.html. Based on what you’ve learned from the quiz, answer the following questions: • What must you do before you post in a discussion group such as the discussion forum in your LMS system? • What’s the importance of knowing the Netiquettes? • What is the Golden Rule of Netiquette? 2. Representations play a central role in facilitating communication by establishing a relationship between some form and some meaningful content subject to some convention; mention the two conditions for effective representation. [2] 3. From your understanding of the term “complex representation”, briefly explain how does implementing them help in creating and interpreting new traffic signs? [3] Question 3 [25 marks] 1. Programs written in high-level languages need to be translated into machine language before being processed. Mention two different mechanisms for doing this translation process. Give examples of programming languages for each one of them. [4] 2. What is an operating system? What functions it does? Give two examples of an old text-based operating system and a new one. [4] 3. The following flowchart diagram shows a loop structure problem: [11]
  • 3. Page 3 / 6 a) From the diagram, specify: The condition, the loop body, and any instruction(s) that is (are) not in the loop body. b) Complete the following simple tracing table for the diagram in figure 1. You may provide an alternative table that shows that you’ve traced the diagram above. number (number is 0) NOT (number is 0) Go into the loop?? Iteration number number output 12 False True Yes 1 9 12 . . . No (Stop) c) How many times will the loop body be executed? d) What is the output after these instructions have been executed? e) What do you expect to happen if the statement (decrement number by 3) is replaced by (increment number by 2)? Why?
  • 4. Page 4 / 6 4. Truth tables can be used to show whether or not two Boolean expressions are equivalent. Complete the truth tables given below to show that: [6] NOT (A OR B) is not equivalent to NOT A OR NOT B Make sure that you end your answer with a proper conclusion. A B (A OR B) NOT (A OR B) True True True False False True False False A B NOT A NOT B NOT A OR NOT B True True True False False True False False Question 4 [25 marks] 1. Write JavaScript code equivalent to the flowchart shown in Figure 1 in QuesƟon 3 above. [7] 2. Trace the following JavaScript code and specify the output: [6] a. var aString = 'M150'; for ( var i = 0; i < aString.length; i = i +1 ) { document.write(aString.charAt(i) + '<BR>'); } b. var x = 0, y = 0; for(var i=0; i <= 5; i++) { x = x + 1; y = y + x; } document.write(x,y); c. var x = 100; if ((x >= 0) && (x!= 100)) x = x * 10 else x = x * 20; document.write(x);
  • 5. Page 5 / 6 3. The following JavaScript codes will not work or will not produce the expected output. Find the errors/mistakes in these JavaScript codes, and then rewrite them after correction. [6] a. var age; age = window.prompt('Please enter your age',''); age = 20 + year; document.write('After 20 years you will be '+age + ' Years old'); b. var moneyAmount, zakat; zakat = moneyAmount * 2.5 /100; document.write ('The zakat of your money is: ' + zakat + ' KD'); c. var answer; answer = window.prompt('Are you enjoying programming with JavaScript? Yes/No', ''); if ((answer = 'Yes')|| (answer = 'yes')) { document.write('Glad to hear that!' + '<BR>'); } else { document.write('You will enjoy it soon with more practice and patience!' + '<BR>') } 4. Write JavaScript code to calculate and print the area and the circumference of a circle as follows: [6] • Define 3 variables: radius, area and circumference. • Ask the user to enter the radius of the circle. • Calculate the area and the circumference of the circle based on the formulas: area= 3.14 * radius * radius circumference = 2 * 3.14 * radius • Print the calculated area and circumference in the output window.
  • 6. Page 6 / 6 Question 5 [ 30 marks] 1. A social association is making a study on the effect of TV on small children. One of the things they need in the study is the average number of hours children spend in watching TV daily. Taking into consideraƟon a sample of 30 children, write a complete JavaScript program that reads the number of hours that these children spend in watching TV in a day, calculate the average and print it in the output window. [12] 2. A new restaurant offers free delivery within a three-mile radius, that is, up to and including three miles from their location. [15] For distances over three miles and not exceeding 12 miles, there is a charge of £1 per extra mile over the first three. a. Write a complete JavaScript program which will work according to the following specifications: • Read the distance in miles from the user. • If the distance is within three miles(i.e. less than or equals to 3), the user should be informed that the delivery will be free; • If the distance is over three miles but not over 12 miles, the user should be informed what the delivery charge is in pounds. To do this, you need first to calculate the extra distance. You should store the value in the variable which is already declared, then use this variable when you output the message. • If the distance exceeds 12 miles, the user should be informed that the company’s maximum delivery distance is 12 miles. b. Run your program with each of the following inputs: • 1 • 5 • 15 For each test, insert a screen dump showing the output into your Solution Document. Important note: In your answers to both parts 1 and 2 (a) of this question; you should follow good programming style that helps readability. This includes: [3] • Using comments stating the purpose of your program. • Selecting meaningful variables names. • Using spacing and indentations to help make the structure of your program clear.