Introduction This is a Team Challenge Activity (TCA). For general information about TCAS, see the section about TCAs in

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Introduction This is a Team Challenge Activity (TCA). For general information about TCAS, see the section about TCAs in

Post by answerhappygod »

Introduction This Is A Team Challenge Activity Tca For General Information About Tcas See The Section About Tcas In 1
Introduction This Is A Team Challenge Activity Tca For General Information About Tcas See The Section About Tcas In 1 (718.36 KiB) Viewed 30 times
Introduction This is a Team Challenge Activity (TCA). For general information about TCAS, see the section about TCAs in the syllabus. What are zoomies? From Urban Dictionary: "When you dog runs around the house like crazy jumping on the couch, running up and down the stairs, and all over the house. It usually ends with them falling to the floor, panting like crazy and taking a nap." Whew, just watching a dog do the zoomies sounds exhausting. Let's make a program that can watch our dog zoom and count how many times he does crazy things. What you must do Form a team of 1 to 4 students, all of whom must help to solve this TCA. Use your text editor to create a .py file containing a Python program. The program should contain a loop. Inside of that loop, repeatedly read in lines of input. Each line of input will tell your program what the dog just did. Your program is going to count up how often the dog does each thing. In particular, you can expect that each line entered will be one of the following: • run jump • stairs. • couch • floor . pant • collapse • nap These lines could come in any order, and there could be any number of them. For example, the input might be the following: run run run jump stairs nap Or the input could be the following: run jump run pant nap You just don't know in advance what to expect, except for one guarantee: the last line always will be nap. When your program reads the nap line, then it should stop looping. Hint #1: The simplest way to do this is with the while True and break statements covered in your textbook. After the loop, your program should output how often every dog action occurred. This should include actions that the dog could have taken but did not. In other words, you should output the number of times that the dog decided to run, jump, stairs, couch, floor, pant, collapse and nap. You must print out these counters in the format shown below, with an equals sign. For example, given the first set of inputs, above, your output should look like the following: run=3 jump=1 stairs=1 couch-0 floor=0 pant=0 collapse=0 nap=1 It is acceptable if you print out the results in another order, as long as you include all the actions. For example, the following also would be fine... run=3 nap=1 stairs=1 jump=1 couch=0 floor-0 pant=0 collapse=0 Finally, within your code, use a comment to indicate what each member of your team contributed. The same rules apply here as in the TCA last week. Hint #2: If you fail to exit the loop, then the autograder will take a very long time to kill your program. So if you write a program that gets stuck in a loop, you're going to waste a lot of time on the autograder. Therefore, if you want to save yourself time and frustration, write your code on your computer, make sure that it works very well on your computer, have a teammate test it on his or her computer, make sure again that it works well on your computer, and only then upload it to the autograder. What to turn in One member of your team must upload your .py file via the upload button on this page. It is not necessary for every member of the team to upload the .py file. Remember that you only can be on one team for this TCA. Grading criteria Your TCA submission will be automatically and repeatedly tested with a several combinations of inputs. The TCA is worth up to 10 points of extra credit per student: • 3 points for outputting a counter (one per line, in the correct format with an equal sign) for each of the possible dog actions (run, jump, stairs, couch, floor, pant, collapse and nap) for every input combination tested • 7 points for outputting the correct number for each of these lines for every input combination tested The TA will deduct up to 10 points per student if your code fails to adequately explain what each member of the team contributed, even if the code is otherwise perfect. For example, you are unlikely to get more than 1 point per student if your code simply gives a list of ONIDs. Likewise, you're unlikely to get more than 2-3 points per person if you have a few members on your team, but there's some member listed who didn't seem to do anything. It's ok if people had different roles (e.g., as code authors versus code testers). The TA may contact one or more member of your team with questions about how the code works. The TA might do this randomly or might select students based on the comment in the code that you submit. Your TA will deduct up to 10 points per student if any member of your team fails to adequately answer the TA's questions about the code. For example, the TA might ask, "What is this variable for?" or might ask, "What does this code do?" or "Why did you do it this way?"
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply