HS1031 Understanding Basic Programming Principles Using Python Assessment Answer

Assessment Details and Submission GuidelinesTrimesterT1 2021Unit CodeHS1031Unit TitleIntroduction to ProgrammingAssessment TypeIndividualAssessment TitleIndividual AssignmentWeight20 % of total assessmentsSubmission GuidelinesThere 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) and your answer sheet in a single ZIP file (4 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.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.Individual Assignment SpecificationsPurpose: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 run Python programs, and your ability to write meaningful comments when required.Marking CriteriaQuestionMarking criteriaMarksQuestion 1Accurate Algorithm2
Appropriate commenting1
Sound logic1.5
Code running successfully1.5Total
6Question 2Accurate Algorithm2
Appropriate commenting1
Sound logic1.5
Code running successfully1.5Total
6Question 3Accurate Algorithm2
Appropriate commenting1
Sound logic2.5
Code running successfully2.5Total
8Total Marks
20Most of the constructs you may need to solve the problems in this assignment have already been covered in your class. However, you are encouraged to research other programming concepts, such as Python Lists, to help you in solving the problems.ApproximateThe mathematical value pie is the ratio of the circumference of a circle to its diameter. Pie is calculated using the following equation:π/4 = 1 – 1/3 + 1/5 – 1/7 + . . .Notice that the sign fluctuates from plus to negative and the denominator increases by two in the series. The more iterations implemented, the more accurate the resulting value for Pie.For example, for an iteration of 3, π = (1 – 1/3 + 1/5)*4= 3.46, while for an iteration of 50, π =3.12 (which is closer to the actual Pie of 3.141592653589793.Write a program (save it as  approximate.py ) which prompts the user to enter the number of iterations and prints out the resulting value of pie on the screen.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 algorithmMarks DistributionCriteriaAlgorithmCommentsLogicExecutionTotalMark211.51.56
TruncateWrite a program (save it as  truncate.py ) which takes an English text as an input and returns the same text, however with the repeated words removed.For example, for the following text:If the input message is: “Every person had a star, every star had a friend, and for every person carrying a star there was someone else who reflected it, and everyone carried this reflection like a secret confidante in the heart.The output message would be: “every person had a star friend and for carrying there was someone else who reflected it everyone carried this reflection like secret confidante in the heart”.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 DistributionCriteriaAlgorithmCommentsLogicExecutionTotalMark211.51.56LuckyDevelop a game (save it as  lucky.py ). This game is played by two players. At each round, each player presents either a (1) Rock, (2) Paper or (3) Scissor using their hand gestures:A Rock (1) wins over Scissors (3) A Paper (2) wins over Rock (1) Scissors (3) win over Paper (2)Design this game such that the first Player can be you (the user), while the second Player is (the computer). The computer generates a random choice at each round. After each round, a message is printed on the screen declaring the winner. The following rules apply:The user enters (1) for Rock, (2) for Paper or (3) for Scissors.Whoever wins the round gets one point.The game terminates when the user hits enter without making a choice.By the end of the game a message is printed on the screen declaring the winner and how many points they accumulated throughout the game.Here’s an example of how the program works: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 DistributionCriteriaAlgorithmCommentsLogicExecutionTotalMark212.52.58
General GuidelinesAll 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.Academic IntegrityHolmes 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.

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
Open chat
1
You can contact our live agent via WhatsApp! Via + 1 929 473-0077

Feel free to ask questions, clarifications, or discounts available when placing an order.

Order your essay today and save 20% with the discount code GURUH