Recent Question/Assignment

HOLMES INSTITUTE
FACULTY OF
HIGHER EDUCATION
Assessment Details and Submission Guidelines
Trimester T1 2021
Unit Code HS1031
Unit Title Introduction to Programming
Assessment Type Group
Assessment Title Group Assignment
Purpose of the assessment (with ULO Mapping) Assess student’s ability to develop algorithmic solutions to programming problems using Python language.
Weight 20 % of the total assessments
Total Marks 20
Word limit N/A
Due Date Week 10
Submission Guidelines • This is a group assignment. Each member of the group must make an even contribution to the submission. Make sure to indicate the contribution of each group member in the assignment cover sheet.
• There are three questions in this assignment. For each question you need to provide your answer, first in the answers sheet, and second as a (.py) Python file. This means your code for each question is provided twice (once as ‘text’ in the answer sheet and once as an executable python script). Failure to do so will wipe your mark for the question.
• Combine all .py files (3 files), your answer sheet and the cover sheet in a single ZIP file (5 files in total).
• Please do NOT zip your files in .rar file format (use zip format instead, as the rar is not supported in Blackboard).
• Please do NOT submit an empty file or folder.
• Please do NOT convert your code into images. Your code must be executable as a .py file, not an image. Images will not be marked.
• Start your answer for your question by stating the algorithm for your solution,
i.e. the steps required to solve the problem. Please number your steps.
• Code must be appropriately commented. Make sure to add comments at each segment of your code to explain what it does. You may lose marks if you do not add comments.
• Make sure that your code runs successfully for all possible entries. Hint: test your code against the examples given in the question (if any).
• Try to approach the solution with the least number of steps. Your code must be clear, logical and easy to understand.
• Your code must be written in Python 3. (You get no marks if the code is written in Python 2 or any other programming language).
• All work must be submitted to Blackboard by the due date (see Blackboard for the exact due date).
• You are encouraged to avoid last minute submissions so that you do not run into technical difficulties.
HS1031 Introduction to Programming
• You are allowed up to three attempts. All attempts must take place prior to assignment deadline. Only the last attempt will be marked.
• You can check your work for plagiarism by directly submitting your assignment. If the score for plagiarism is high, you are welcome to resubmit. This will count as a second or third attempt.
• Please note that plagiarism is treated seriously. Please do not copy from anyone or give you are answers to someone else, even after submission due date. Also no one should do the assignment on your behalf. Submissions with high plagiarism score are penalised in accordance with Holmes Academic Misconduct Policy.
Group Assignment Specifications Purpose:
This assignment evaluates your understanding of basic programming principles using Python language. In particular, it assesses your ability to develop algorithms to solve simple problems, successfully develop and run Python programs, and your ability to write meaningful comments when necessary. The assignment also provides a platform for students to work together in groups to develop solutions for programming problems, similar to the way complex programming projects are done in real-world.
Marking Criteria
Question Marking criteria Marks
Question 1 Accurate Algorithm 2
Appropriate commenting 1
Sound logic 1.5
Code running successfully 1.5
Total 6
Question 2 Accurate Algorithm 2
Appropriate commenting 1
Sound logic 1.5
Code running successfully 1.5
Total 6
Question 3 Accurate Algorithm 2
Appropriate commenting 1
Sound logic 2.5
Code running successfully 2.5
Total 8
Total Marks 20

1. Decorate
Write a script which prompts the user to enter a string of text and then prints out the message in a reversed order. Each word is printed in a separate line. The output must be enclosed in a square shape of $ sign. Save your file as decorate.py.
For example,
All punctuation marks must be removed. Your output should be formatted as in the example above.
Start your answer by stating the algorithm, i.e. steps required to solve the problem. Also make sure to add comments to your code that correspond to the algorithm.
Marks Distribution
Criteria Algorithm Comments Logic Execution Total
Mark 2 1 1.5 1.5 6
2. Password Generator
Write a program which generates random passwords. The program allows the user to choose from three different levels of password complexity:
• Level 0: Password consists of a random combination of the letters that form user’s full name (excluding empty space). Password consists of exactly 8 letters (even if total name length is less than 8).
• Level 1: Password consists of 8 random small letters from the alphabet.
• Level 2: Password consists of a combination of capital and small alphabet letters, numbers and special characters (!@#$%^&*()?), with a length of 8.
The user should be able to decide the level of complexity of their password. Your program should prompt the user to enter their full name so that Level 1 option works. Save your file as passGen.py.
Below is an example of the output:
Start your answer by stating the algorithm, i.e. steps required to solve the problem. Also make sure to add comments to your code that correspond to the algorithm.
Marks Distribution
Criteria Algorithm Comments Logic Execution Total
Mark 2 1 1.5 1.5 6
3. Guessing the Alphabet
Develop a game where the user picks a letter out of the English alphabet and the computer attempts to guess the letter in the least possible number of attempts. The program starts by prompting the user to randomly choose a letter from A to Z (let’s call this letter the Target). The computer then makes a guess. The user provides one of four responses:
• The user enters (1) if computer’s guess is less than the target in the order of the alphabet.
• The user enters (2) if computer’s guess is greater than the target in the order of the alphabet.
• The user enters (3) if computer’s guess is equal to the target.
• The user enters (0) to exit the game.
Once the target is succesfully guesssed by the computer, a message is displayed on the screen congratulating the computer and stating the number of attempts it took it to succesfully guess the target. Save your file as alphaGuess.py. Below is an example for program execution:
Start your answer by stating the algorithm, i.e. steps required to solve the problem. Also make sure to add comments to your code that correspond to the algorithm.
Marks Distribution
Criteria Algorithm Comments Logic Execution Total
Mark 2 1 2.5 2.5 8
HOLMES INSTITUTE
FACULTY OF
HIGHER EDUCATION
General Guidelines
All submissions are to be submitted through the safeAssign facility in Blackboard. Submission boxes linked to SafeAssign will be set up in the Units Blackboard Shell. Assignments not submitted through these submission links will not be considered.
Submissions must be made by the due date and time as determined by your Unit coordinator. Submissions made after the due date and time will be penalized per day late (including weekend days) according to Holmes Institute policies.
The SafeAssign similarity score will be used in determining the level, if any, of plagiarism. SafeAssign will check conference web-sites, Journal articles, the Web and your own class members submissions for plagiarism. You can see your SafeAssign similarity score (or match) when you submit your assignment to the appropriate drop-box. If this is a concern you will have a chance to change your assignment and resubmit. However, resubmission is only allowed prior to the submission due date and time. After the due date and time have elapsed your assignment will be graded as late. Submitted assignments that indicate a high level of plagiarism will be penalized according to the Holmes Academic Misconduct policy, there will be no exceptions. Thus, plan early and submit early to take advantage of the resubmission feature. You can make multiple submissions, but please remember we only see the last submission, and the date and time you submitted will be taken from that submission.
HS1031 Introduction to Programming
HOLMES INSTITUTE
FACULTY OF
HIGHER EDUCATION
Academic Integrity
Holmes Institute is committed to ensuring and upholding Academic Integrity, as Academic Integrity is integral to maintaining academic quality and the reputation of Holmes’ graduates. Accordingly, all assessment tasks need to comply with academic integrity guidelines. Table 1 identifies the six categories of Academic Integrity breaches. If you have any questions about Academic Integrity issues related to your assessment tasks, please consult your lecturer or tutor for relevant referencing guidelines and support resources. Many of these resources can also be found through the Study Skills link on Blackboard.
Academic Integrity breaches are a serious offence punishable by penalties that may range from deduction of marks, failure of the assessment task or unit involved, suspension of course enrolment, or cancellation of course enrolment.
Table 1: Six categories of Academic Integrity breaches
Plagiarism Reproducing the work of someone else without attribution. When a student submits their own work on multiple occasions this is known as self-plagiarism.
Collusion Working with one or more other individuals to complete an assignment, in a way that is not authorised.
Copying Reproducing and submitting the work of another student, with or without their knowledge. If a student fails to take reasonable precautions to prevent their own original work from being copied, this may also be considered an offence.
Impersonation Falsely presenting oneself, or engaging someone else to present as oneself, in an in-person examination.
Contract cheating Contracting a third party to complete an assessment task, generally in exchange for money or other manner of payment.
Data fabrication and falsification Manipulating or inventing data with the intent of supporting false conclusions, including manipulating images.
Source: INQAAHE, 2020
HS1031 Introduction to Programming

Looking for answers ?