ICTPRG407 Assessment Task 1
Task A: Short answer questions
Important note: all questions must be answered in your own words. Copy and pasting significant amounts of text from anywhere without attributing the source is considered plagiarism and may result in you failing this class.
Q1. In this class we created Python scripts using the website repl.it (some people used programs called Integrated Development Environments/IDEs like PyCharm) as your software development platform. Answer the following questions about repl.it or your chosen IDE:
a. What are two benefits of writing scripts using your chosen platform?
(e.g. how does it help you write/fix/test code?)
b. Can it be used offline/without an internet connection?
c. Can it be used on Windows and Mac OS X operating systems?
a.The user can learn to code and can do some fast editing. Also helps to creating new applications in web.
b.Repl you cant use if you are offline
c.Yes
Q2. Individuals and companies are encouraged to create innovative products/services though the use of intellectual property law. These laws give creators and inventors the exclusive right to use, sell, or license their creation.
In 1999, Amazon was awarded a patent for “1-click” purchasing of goods. If you clicked on a book and clicked the “1 click purchase” button then Amazon’s innovation then checks your Amazon account, bills your default credit card, uses your default shipping method, sends the book to your default address, etc.
a. Using the internet, research Amazon’s 1-click patent. Provide a brief (2-3 sentences) summary of the patent.
b. Briefly (2-3 sentences) summarise these two IP laws: 1) Copyright Law. 2) Patent Law
(e.g. What does it apply to – e.g. innovative ideas? songs? Code?)
c. Amazon needed to write a significant amount of code to make 1-click work. Which law protects the actual code itself: Copyright Law or Patent Law?
d. Amazon argued this is a new, novel process/invention, something that should be protected by law. Which law protects the new, innovative process: Copyright Law or Patent Law?
Q3. In class we spoke about the Software Development Lifecycle (SDLC), including models like Waterfall and Agile. Choose either the Waterfall or Agile model and answer the following questions:
a. List and briefly describe the phases within your chosen model.
b. What are two best advantages of your chosen SDLC?
c. What are two of its biggest weaknesses?
d. Today, clients and businesses prefer to work closely with programmers - constantly revising program requirements and making changes mid-project. Does your chosen model work well with this modern approach or does it work poorly? Describe your answer.
Q4. In class, we’ve developed small programs and used several processes/techniques to help us make better scripts.
a. It is best practice that before we write code, we begin by planning/designing what it needs to do (just like a blueprint for a house before building it). What is one method that we can use to make a plan/design?
b. Once we start developing code, we often run into problems we need to fix. What are two different ways you’ve fixed issues with your code?
(e.g. How did you know you had a problem to fix? Don’t include “Ask a friend/teacher”)
c. Once we’re done writing the code, to know it works, we need to make sure the code is correct and complete. What’s this very important “checking” phase called?
Task B:
Make your own video game system! For this assignment, you will make three different games:
• Guess-the-number
• Rock Paper Scissors Tournament
• Maths Quest – practicing Maths
General Requirements:
• You must include comments at the top of every program with the date, your name, a brief description of the program (including a brief summary of what the program will take as input and give as output)
• All programs should have at least two comments in the code, briefly describing what the code is doing
What to hand in:
• This document. In this document, be sure to include:
o Your pseudocode (part 3 only)
o The python code from all your programs
o Screenshots of your programs output (use screenshots / Snipping tool)
Parts 1, 2, and 3 are below – scroll down the page to review the requirements for each part.
Part 1: Guess-the-number
Description: Your friend has started writing his first Python program but it has several bugs and parts where they didn’t know how to complete the code. Your job:
A. Complete the program (complete/fix any line you see question marks like this: ???)
B. Fix the bugs:
• Line 14 – The screen output should be “Hi Jeff!” but it’s showing “Hi name!”
• Line 15 – Python is complaining about integers and strings
• Line 20 – Python can’t understand the IF statement (there are other problems too)
• Line 23 – Make Python print the random number
PS: Like the real world, there are more bugs that aren’t mentioned above – you’ll have to find them.
Part 2: Rock Paper Scissors
Description: Again, your friend has started writing a Python game and needs your help to finish it – this time they need a lot more help. The Rock Paper Scissors has 9 different possibilities (Player 1 chooses rock vs. Player 2 chooses paper = Player 1 wins, rock vs scissors = rock loses, rock vs. rock = tie, paper vs rock…) and your friend doesn’t know where to start.
Your job: finish their code (i.e. only change the part on line 27 with ??? – hint: you will need to use if/elif).
Part 3: Math Quest!
A local school has asked you to write a Python program that’ll allow their students to practice their multiplication / times tables. They’ve asked you to make the program work something like this example:
(Everything in black is output from your program. Text in red is input using the keyboard by the user.)
Welcome to Maths Quest! What is your name? Jeff
Jeff, which times table would you like to practice? (1-12) 6
Ok Jeff: on a piece of paper, write down the 6 times table from 1 to 12. When you’re ready I’ll show you the answer so you can check your work.
Are you ready? (Enter ‘y’ to start) n
Are you ready? (Enter ‘y’ to start) n
Are you ready? (Enter ‘y’ to start) y
1 x 6 = 6
2 x 6 = 12
3 x 6 = 18
4 x 6 = 24
5 x 6 = 30
6 x 6 = 36
7 x 6 = 42
8 x 6 = 48
9 x 6 = 54
10 x 6 = 60
11 x 6 = 66
12 x 6 = 72
Did you get them all correct? (y/n) y
Great job! Thank you for playing Maths Quest.
Your job:
1. Write the pseudocode for this program.
2. Write the code.
3. You should always test your code. Describe in a couple sentences how you tested:
A. If the “Are you ready?” prompt worked? (i.e. the program only continues if the student is ready)
B. Did the student get the correct message at the end of the program?
(Did you get them correct? Yes – great job! No? Better luck next time.)
Part 1
A. Code (copy/paste it below)
B. Screenshots of the output from your program (minimum 2)
Part 2
Code (paste it below)
Screenshots of the output from your program
Part 3
Pseudocode (paste it below)
Code (paste it below)
Screenshots of the output from your program
Answers to Part 3 questions
Marking Guide
Question Criteria
Part 1 Satisfactory: The program runs and terminates successfully. Indentation is correct. At least 4 code errors are identified and fixed correctly. Comments or documentation is present and appropriate. Screenshots present.
Not Yet Satisfactory: The program does not run. No documentation present. No screenshots present.
Part 2
Satisfactory: The program runs and terminates successfully. Indentation is correct. The if statement is correct and complete (9 cases). Comments or documentation is present and appropriate. Screenshots present.
Not Yet Satisfactory: The program does not run. No documentation present. No screenshots present.
Part 3
Satisfactory: The program runs and terminates successfully. Indentation is correct. Program logic** is correct. Comments or documentation is present and appropriate. Screenshots present.
Not Yet Satisfactory: The program does not run or significant parts of the program are not complete. Program logic* has major faults. No documentation present. No screenshots present.
**Logic requirements: The program must:
• request the user’s name and output it
• print the user-chosen times table correctly (e.g. 6x1=6, 6x2=12…)
• not print the times table until the user confirms they are ready
• print an appropriate message after the user confirms they were correct or they were incorrect
GET ANSWERS / LIVE CHAT