New

Learn smart - Learn online. Upto 80% off on courses for a limited time. View Courses

Get 24x7 live help from our Top Tutors. All subjects covered.

250 words

Students Who Viewed This Also Studied

24 Pages
CIS6007 Parallel and Distributed Systems

Questions: Learning Outcomes This assessment is designed to demonstrate a student’s completion of the following Learning Outcomes: Demonstrate understanding of the theoretical concepts and ...

Course

CIS6007

Subject

Programing

University

Cardiff School of Technologies

0 Page
Computer Forensics

...

Course

KF5006

Subject

Programing

University

Northumbria University

Season

Fall

6 Pages

The objective of this task is to allow the student to synthesize the various aspects of the project into one report covering the whole of the project undertaking.Description of the AssessmentYou will ...

Course

CS3605

Type

Dissertation

Subject

Programing

University

Brunel University

4 Pages
ISB10103 Principles of Computer Programming

Task: Recently you are hired by Seng Kek Superstore as a junior programmer. Your first task is to produce a Point-of-Sale system (POS) for the new outlet at Batu Caves district. Your system should ...

Course

ISB10103

Type

Programming

Subject

Programing

University

Universiti Kuala Lumpur

Practical Test contains two parts that will be set up on Moodle:

1. Quiz 1 - MCQ questions
2. Quiz 2 - Essay and programming questions

Section A  10 Marks

Answer all the questions in this section. Each question is worth 1 mark.

1. A byte is made up of eight __________.
a. CPUs
b. instructions
c. variables
d. bits

2. In Python, what does the "//" operator do in the expression 6 // 4?
a. It performs an exponentiation to the 4th power.
b. It returns a remainder or modulus.
c. It returns a whole number as a result.
d. It returns a float as a result of division.

3. What is the value of the following Python expression: 3**(5//2)%2-1 ?
a. 0
b. 1
c. the expression is invalid
d. -1

4. Which of the following are valid variable names?
a. result!
b. weight
c. _height
d. secondResult
e. 2MoreToGo
f. second Result

5. What is the output of the following code?

a. It doesn’t generate any output.
b. 1
2
4
c. 4
d. 1
2
3
4

6. Which Boolean value does this Python expression evaluate to?

a. True
b. False
c. None

7. What is the output of the following program?

a. GeeksforGeeks
b. GFG
c. GFG GeeksforGeeks
d. Compilation error

8. When is the finally block statements executed?
a. When a specific condition is satisfied
b. When there is an exception in try block
c. When there is no exception in try block
d. always

9. Which of the following are true of Python dictionaries?
a. All the keys in a dictionary must be of the same type.
b. When you want to retrieve a specific value from a dictionary, you use the key that is associated with that value.
c. Dictionaries are mutable objects.
d. Elements in dictionary are sorted.

10. What’s the output of the code snippet in the figure?

a. *walking*
b. Woof!
c. Arff!
d. CanineError: Dog malfunction

Section B 10 Marks

Read what is required from each question carefully and answer all parts of the question. Explain your answer and give an appropriate example. Each question is worth 2 marks.

1. Assume that setA is a set that contains the following elements: 15, 1, 3, 8, 17, and Assume that setB is a set that contains the following elements: 4, 8, 16, 2, 3, and 21. What are the values in the following sets?

a. setA ^ setB
b. setA – setB
c. setA.union(setB)
d. setA & setB

2. Construct truth table for the following Boolean expressions: (A or B) and not B

3. The Python file, named apple.py contains the following segment of code:

a. On line 9, = appears. What does this do?
b. On line 4, == appears. What does this do?
c. What will line 11 cause the script to print?
d. What will line 12 cause the script to print?
e. What is the purpose of the function apple?

4. What happens when the programmer forgets to update the loop control variable in a while loop? Explain with example.

5. What is the difference between floating-point and integer division? Explain with example.

Section C 20 Marks

Each question is worth (5) marks. Read what is required from each question carefully and answer all parts of the question.

1. Construct a program that has a function that receives a list and calculates the sum of the values in that list.

2. Construct a program that has a function which receives a string from the user and creates a dictionary that maps each character in the given string to its frequency, that is, how many times that character appears in the given string.
For example, if the given string is "book", the program creates the following dictionary:
b : 1
o : 2
k : 1

3. Write a code segment that opens a file for input and prints the number of four-letter words in the file. If the file cannot be opened catch the exception and display appropriate message.

4. Write a Python class named Circle constructed by a radius and two methods which will compute the area and the perimeter of a circle.

ISY1003 Foundations of Programming

Solved by qualified expert

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

MyAssignmenthelp.com strives to deliver quality content to students of USA and deliver assignment writing services as per individual assignment assistance. We have built up a pool of 3800+ assignment experts who provide academic writing help in more than 100+ subjects. Our skilled and experienced assignment writers deliver custom-made assistances, and they offer need-based university assignment help to students as per their assignment demands.

More ISY1003 ISY1003 Foundations of Programming: Questions & Answers

Q

CIS6007 Parallel and Distributed Systems

Questions: Learning Outcomes This assessment is designed to demonstrate a student’s completion of the following Learning Outcomes: Demonstrate understanding of the theoretical concepts and abstractions to the design of novel and innovative distributed and parallel systems. Critically eva ...

Q

Computer Forensics

...

Q

The objective of this task is to allow the student to synthesize the various aspects of the project into one report covering the whole of the project undertaking.Description of the AssessmentYou will be provided with advice on an appropriate format for your dissertation during lectures and supervisi ...

Q

ISB10103 Principles of Computer Programming

Task: Recently you are hired by Seng Kek Superstore as a junior programmer. Your first task is to produce a Point-of-Sale system (POS) for the new outlet at Batu Caves district. Your system should be able to store Product Code, Description, Price and Free Gift. You are required to write a program ...

Content Removal Request

If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the content removal request.