Skip to content
Snippets Groups Projects
Commit 653b27c7 authored by Nathan's avatar Nathan
Browse files

week 10

parent 402ca470
No related branches found
No related tags found
No related merge requests found
practicals/week10/tasks.md
practicals/week10/notes.md
practicals/week10/code.py
\ No newline at end of file
# Week 10 Tasks for practicals
From [Karl Beechers book: Computational thinking: a beginner's guide to problem-solving and programming ](https://blackboard.uwe.ac.uk/webapps/blackboard/content/listContentEditable.jsp?content_id=_9740235_1&course_id=_358486_1&mode=reset), read chapter 3.
# Task 1
## 1.1 : Tree diagrams
Create a tree diagram to decompose the following problem (You may use software of your choice - or scan in pen and paper if you must! I'd recommend [draw.io](https://app.diagrams.net/).)
Face-Off need to run invite only tournaments for hand selected E sports teams in order to raise their profile. They need a software system for inviting teams, integrating with their system, scheduling the games that are to be played and providing the correct servers for this to happen on.
## 1.2 : Solving a Concrete instance
Take one of the problems that you have decomposed from the problem in task 1.1 and provide a simple python function that generalises this task.
An example is provided to show the structure of how this should look (if you are unfamiliar with python functions, take a look [here](https://www.w3schools.com/python/python_functions.asp)):
> In my decomposition, one of the sub problems was to schedule the game being played to be on a server that was close to the two teams playing. This is represented by a function that takes the location of each team and returns a server location for them to play on:
```python
def choose_server(team1, team2):
server_lon = "london"
server_par = "paris"
server_sp = "spain"
# if the teams are from the same region, use a server there
if(team1 == team2):
match team1:
case "london":
print("Playing game on server: " + server_lon)
return server_lon
case "paris":
print("Playing game on server: " + server_par)
return server_par
#etc etc
elif():
pass
# find closest server to team 1
# find closest server to team 2
# if they are the same, play game
# if they are the same use that server
```
This can be tested and explored using code such as the following:
```python
t1 = input('where is team 1 from: ')
t2 = input('where is team 2 from: ')
choose_server(t1, t2)
```
> Note: The solution above is only very much partially implemented and you would be expected to draft this out a bit further. You are however permitted to defer certain more complicated components - for example where the elif: statement is implemented using `pass` which essentially does nothing. In these cases you should use comments to describe what needs to be added here. This is useful where a more specific or involved algorithm might be used for example (and in the case of assessment work, you can come back to this later once you have covered that topic).
# Task 2 (Assessment Work!)
## 2.1
You should start by stating the problem that you are looking to solve at the start of your portfolio and you should check with your practical tutor that this problem has sufficient scope. (If you are unsure of a problem, you can choose one of the supplied problems from the scenario).
## 2.2
For your chosen scenario isolate one of the problems related to that scenario and decompose the problem using a tree diagram- this diagram should be at least 3 layers deep. You should discuss this process in approximately 150 words and add this discussion and tree diagram to you `portflio/report.md` file in the decomposition section.
## 2.3
Attempt to create a function which provides a generalised solution to one of the smaller decomposed problems that you have defined. You will need to assume some form of input for this example (you are free to use you existing python knowledge to create appropriate inputs). For those that are new to programming, the use of a function with arguments would be sufficient for this - see task 1.2 for an example.
## 2.4 (Extra credit)
Continue to create generalised functions that can address elements of the problem that you have broken down. Further discuss these functions in your portfolio.
# Task 3 : Requirements elicitation
## 3.1
Greenstores are designing a simple app to allow their users (owners of Electric Vehicles (EVs)) to schedule times for them to ensure their car has charge. For example, if a user knows they will be planning a trip that is not part of their normal routine, their car battery may have been depleted to assist the power grid and therefore not be charged. This app needs to allow users to prevent this.
## 3.2
In this weeks notes:
Consider the feasibility for such an app given existing technology and laws - is this feasible?
## 3.3
Describe the functional and non functional requirements for such an app.
# Task 4 : Requirements elicitation (Assessment Work!)
## 4.1
For the problem you have identified for your assessment work, discuss, research and write approximately 150 words that describe how you would explore the feasibility of solving the problem you have identified. Consider available technology for addressing the problem and how you might break the problem down to understand what sub problems may take longer (or even an undefined amount of time). How would you approach designing MVP (minimum viable product) solutions to test this?
## 4.2
In your portfolio, provide the functional and non functional requirements for your problem, writing approximately 150 words for your assessment work. Remember to discuss how these requirements would be validated.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment