Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi there! Please give me the full hand written answer of this question. (Also attach a picture of your code please) And make sure to

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Hi there! Please give me the full hand written answer of this question. (Also attach a picture of your code please) And make sure to answer all of its parts. I have given 3 examples in my last 2 images.

Please Solve it only if you're sure that your answer is 100% correct otherwise let any other person to solve it.

I need the Correct answet please otherwise I'll give dislike and report it to the Chegg authorities. Sorry for these words but I'm tired of getting lots of wrong answers lately.

Please answer it as soon as possible with clear hand writting and picture of you code and thank you so much for your time and effort

Question 2 (25 points): Purpose: To practice design processes, as per Chapter 5. Degree of Difficulty: Moderate. Restrictions: This question is homework assigned to students and will be graded. This question shall not be distributed to any person except by the instructors of CMPT 145. Solutions will be made available to students registered in CMPT 145 after the due date. There is no educational or pedagogical reason for tutors or experts outside the CMPT 145 instructional team to provide solutions to this question to a student registered in the course. Students who solicit such solutions are committing an act of Academic Misconduct, according to the University of Saskatchewan Policy on Academic Misconduct. In this question you will apply an informal design process to the task of implementing a program at the level of Assignment 1 . The purpose is to follow the process thoughtfully and reflectively. Please read the question description carefully before you start! What to Hand In Usually this appears last but in this question, it's first so that you know what you have to hand in. As you can see, the code you develop is a small part of this work. - Your plan to complete this question. a2q2.p1an. txt - Your design document. a2q2_design.txt - Your answers to the reflection questions, a2q2 reflections, txt - Your Python program a2q2.py You are allowed to use PDF, RTF. DOC files instead of TXT. Be sure to include your name, NSID, student number, course number and lecture section at the top of all documents. Problem Specification In this question you will implement a program to solve a simple task. The task itself is related to a statistical and physical model called a Random Walk. A Random Walk is a string consisting of a random sequence of the letters ' L ' and ' R '. For example' 'I R R L R'. We re going to imagine that this sequence describes a person taking a step left ' L ' or right ' R ' at random along a straight line. The question we want to answer is this: in terms of steps, how far away is the person after taking all the steps? Well call this the distance and it will always be positive (or zero). since we don't care which side the person ends up on. Here are some examples to help clarify, - 'L L L': distance is 3 'R L L': distance is 1 - 'r R L L': distance is 1 - 'R R R': distance is 3 - 'R L L R': distance is 0 - 'I R R L R': distance is 1 You will be given a number of datafiles containing random walks of different lengths. Each file will contain a number of lines. Each line will be a random walk. The program you must write will open the file, read each line, and then display the distance of the random walk for that line. For example, if a datafile contained the examples above. your program would display For this question you will do the following: - You will start by creating a plan for your work. Your plan will schedule time for the following development phases: - Requirements. The specification is given above, so this part of the plan includes reading the Specification section carefully. You do not need to hand in anything for this part. - Design. Your plan will indicate when you will do the desian phase (day time. Location), and how long you think it will take (duration). - Implementation Indicate when you will work on the implementation phase (day, time, location). using your design, and how long you think it will take (duration). - Testing and debugging. Indicate when you will work on testing and debugging cday, time, location), and how long you think it will take(duration). - Final clean up for submission. Indicate when you will work on clean up (day, time, location), and how long you think it will take (duration). Yo must submit this plan for grading - You will design your program, producing a design document outlining your implementation. You will submit this design for grading. - You will record the amount of time you actually spent on each phase of the plan you will submit this information for grading. Details Details about the Plan On page 7 is an example table that you could use to outline your plan. It has columns for the information required above. You are not required to follow your plan exactly, to the last detail It's a plan, not a commitment Il's hetpfut for monitoring your progress. You might find your plan didn't account for issues and problems that came up. That's okay. Make note of those in your reflections. Details about the Design Your design document should describe your implementation in terms of the functions you'll need to complete the program. For each function, you must specify. - Pseudo-code or informal algorithm descriptions. The form of the description is up to you. - An informal description of the inputs and outputs for each function. - An informal description of any test cases you will need to check your functions. It's important for you to keep in mind that the purpose of the design is to help you, and you should not be overly worried about the format of your design. Details about the Implementation. Testing, and Debugging Try to apply an incremental approach. For each function in your design: - Implement the function according to your design. - Test your function. - Debug as necessary. Keep track of your time during these phases. Youll want some objective evidence for how long things actually take, compared to what you estimated in your plan. This objective evidence will help you prepare more realistic plans in the future! How you actually complete these phases is less important than being objective about your progress. Details about your submitted program. The program is the least important part of the assignment. Make it look presentable, by adding comments and doc-strings to your functions Details about your reflection Your answers to the reflection questions betow are graded for relevance and thoughtfulness of your answer. There are no right answers. and the only way to lose these marks is to fail to reflect meaningfully. Reflection questions 1. How tong did it take for you to create your plan? 2. Did you revise your design? In other words. did any part of your implementation tum out to be signif. icantly different from your design? If so, briefly explain the reason for the difference(s).. 3. Did any of the phases take significantly longer than you had planned? If so. explain what happened. and suggest ways to avoid this in the future. Evaluation - 5 marks. Your plan allocated time to every phase of the development process, and the times were plausible. - 5 marks: Your design gave complete and useful details in terms of function descriptions, pseudo-code algorithms, and test cases. - 5 marks. Your answers to the reflection questions were thoughtful and relevant. - 5 marks: Your program is correct, and not terribly inefficient. - 5 marks: Your program is well-documented with helpful comments for the reader. Development Plan \begin{tabular}{|l|l|l|l|l|l|} \hline Phase & Day & Time & Location & Duration & Actual Time \\ \hline Requirements & & & & & \\ \hline Design & & & & \\ \hline Implementation & & & & \\ \hline Testing/debugging & & & & \\ \hline Tidying up & & & & & \\ \hline \end{tabular} LRRRIRRRRLL

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

Students also viewed these Databases questions

Question

What information and new knowledge does Brenda need?

Answered: 1 week ago