Columbia University Ch 6 & 8 Computational Thinking Modern Problem Solver Text Questions
Computational Thinking for the Modern Problem Solver text. Assignment: Chapters 6 & 8 QuestionsIntroductionPrepare written answers to, and be prepared to discuss each of the following questions, each of which is taken from, is an extension of, or is inspired by the correspondingly numbered exercise question from the Computational Thinking for the Modern Problem Solver text. Chapter 6:Question 2. Is this picture (i.e. diagram) an activity diagram or a state diagram? In addition, develop a Python source program (as a method) that is fully equivalent to what is expressed by this diagram. You can then use this program to test your answers to Question 3.Question 3. What is the first value of X output when this algorithm executes? Also, what is the last value of X output when this algorithm executes?Question 6. Consider the Python source program, given in the file Ch06Qu05.py, that is presented as being fully equivalent to the corresponding diagram. Test both the diagram and the program with the following “use scenario”. Beginning is Inactive, the user then presses buttons in the following order: shutter button half pressed, shutter button fully pressed, play button pressed, shutter button half pressed. What is the resulting value of photoCount?Create three additional distinct “use scenarios” and test both the diagram and the program with them, providing the resulting value of photoCount for each. Finally, comment on whether or not you are confident that the given program is, in fact, fully equivalent to the diagram.Question 8. Develop a Python source program, similar to the one given in the file Ch06Qu05.py, and to be named Ch06Qu09.py, that is equivalent to the corresponding diagram. The program you are to develop for this question should reuse some of the methods given. Test both the diagram and the program with the following “use scenario”. Beginning in idle, travel 20 miles in the city, then travel 30 miles on the highway. How many gallons of gas are used?Create three additional distinct “use scenarios” and test both the diagram and the program with them, providing the resulting value of gallonsUsed for each. Finally, comment on whether or not you are confident that the program you developed is, in fact, fully equivalent to the diagram._____________________________________________________________________________________________________________ Chapter 8:Question 4. Consider using indexing, length, indexOf, substring and concatenation to perform the following tasks.4b. Develop a Python functional method that takes a string argument that represents a person’s name in the form first, last (that is, first name followed by a comma, followed by a single space, then followed by the last name) and returns a string result that is a representation of that person’s name in the form last, first (that is, last name followed by a comma and a space, then followed by the first name.) This method must work for all strings that are valid representations of names in the given form. Name the method ReverseName and place it in a file named ReverseName.py. 4e. Tic-tac-toe is a game where users take turns writing either an X or an O on a 3-by-3 grid. The objective is to get three of the same marks in a row, column or on one of the diagonals. Consider the representation of the state of a tic-tac-toe game as a single string of nine characters, where each character is either an X, an O, or a dash. Thus, the string “X-O-X-O--“ is a representation of the board: For this question, you are to develop a functional method in Python that takes a string (of length nine) representing the state of a tic-tac-toe game and returns True if and only if that string represents a winning state for either X or for O, and returns False otherwise. Question 7. Write a pattern for each of the following items.All words that start with m and end with ing and that are exactly seven letters long.All words that start with b and do not end with e, d, or k and are exactly four letters long.All words that consist of only the letters a, e, i, o, n, and t and are at least three letters long.Any word that contains the letter n exactly three times.Assignment: Real World Requirements AnalysisIntroductionIdentify a system, with a significant software component, that you have used during your work life, or imagine a new system or revisions to an existing one. The purpose of this assignment is for you to carry out a limited form of Requirements Engineering and develop a Requirement Specification for the system you have identified. Hopefully, this assignment will allow you to draw upon your work experience and related domain knowledge and apply these to a clearly identified problem. Since Requirements Engineering is a process carried out by numerous people, including both Software Engineers and clients or customers who are the domain experts, this assignment will be limited it its results. Nevertheless, even given these limitations, this assignment should help you develop a better understanding and appreciation of Requirements Engineering. In addition to providing the statement of requirements (which often takes the form of a list or lists), it will be necessary for you to provide appropriate background and explanation of the system to your readers.Assignment: Diagrams for Number Guessing GameIntroductionIn Module 3, you were called upon to modify the Python source code given in the file NumberGuessing.py. For this assignment you are to develop both an Activity Diagram and a State Diagram for this original given version of the program. You are encouraged to use appropriate software tools to render these diagrams, but neatly hand drawn ones that have been scanned will be accepted.Week 5 Assignment: Number Guessing Game Part 2This assignment builds upon what you did last week with the Number Guessing Game. You will take your submitted assignment ( NumberGuessingGameR.py) and make the following modifications:Modifying the ProgramSince a range of numbers is provided to the user, any guess outside of that range should be considered an “invalid” guess and not count against tries.Further, any non-number or non-integers (letters, blanks, words, numbers with decimals, etc) should be considered “illogical” guesses and also not count against tries. Be sure to modify your NumberGuessingGameR.py source code and rename it NumberGuessingGameR2.py.SubmissionYou are to submit 2 files:The Source Code, NumberGuessingGameR2.pyA Word Document with screenshots of the working revisions and explanation of those revisions.If you run into any issues, please describe them, what you tried to do to fix them, and why they didn’t work.