Assignment 1 Exercise Answers

docx

School

George Washington University *

*We aren’t endorsed by this school

Course

1012

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

2

Uploaded by ProfessorKnowledgeWaterBuffalo330

Report
Assignment 1 Exercise Answers A1.1 Exercise Answer : The reason why the original code with ‘last_pos = len(A) – 3’ did not work is because subtracting 3 would leave 4 numbers including the last starting point. I changed this to ‘last_pos = len(A) – 2’ so that no matter the starting point there is at least one group of exactly 3 numbers left to be checked. A1.3 Exercise Answer: To tell when there isn’t a 3-element sublist, I inserted ‘print('No 3-element sublist found')’ to the very end of the for-loop with the i variable. That way after checking all of the starting points the code prints that nothing was found. However, if a starting point is found it should not go to that print statement so I inserted a return statement in the if statement stating a sublist was found so that the execution leaves the loops. A5 Exercise Answer: Title: How Computer Science Made Me Brave | Madeline Griswold | TEDxBrownU URL: https://www.youtube.com/watch?v=nZ1ehJqXor0 . Madeline Griswold is the speaker for this TED talk, and she is a junior at Brown University concentrating in Computer Science with a focus on Machine Learning. She has worked with Andy Van Daan in his research group and taught many students from elementary to high school how to code. Madeline is very passionate about computer science education and she has also interned as a Software Engineer at Bloomberg.
In her TED talk, Madeline Griswold speaks about her experiences at school while having a speech impediment. Many students made fun of her speech and did not believe her when she said she would make a speech for her middle school graduation. However, Madeline had found a new source of confidence through computer programming as it served as a second language to express herself in. While she struggled at first and had trouble getting some of her programs to run, she soon began to gain more skill and find enjoyment in programming. When it came to her speech, she knew she would mess up half of her words, but that did not discourage her as she knew she made mistakes in code while still getting great results. This was how she gained confidence from programming, and how she found the courage to knock on Andy Van Daan’s door to be interviewed without appointment to join his research group. These experiences are what made her feel that it is very beneficial to learn computer programming and make use of it as a form of self-expression. In my opinion, I do somewhat agree with Madeline Griswold’s perspective on computer programming. While I have never found much interest in computer programming and have only recently began working with it for this class, I see my younger sister having a similar experience as Madeline. My younger sister has autism, and while her speech delay does not affect her anymore, she does have trouble expressing herself. Now she has discovered how much she enjoys coding, and she spends hours making and viewing projects on Scratch. I am sure my sister is not the only one who relates to Madeline Griswold, and I do believe giving everyone an opportunity to explore computer programming can help people with their self-expression.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help