Design Thinking Programming Challenge

Design Thinking Questionaire Results: 

 

Design Thinking Sentence to summarise chosen idea:

Hanna and I need a way to create a fun app to help young children learn simple things because schools HKIS doesn’t spend enough time teaching the simple things.

A list of equipment needed for the project:

  • Computer: ai2.appinventor.mit.edu

Flowchart:

Pseudo Code:

  1. Start game
  2. Begin the learning colors section
  3. Display image and three options for user
  4. Redirect user to a verdict: congratulations or incorrect
  5. Display image of next question and three options for user
  6. Redirect user to a verdict: congratulations or incorrect
  7. Begin the learning animals section
  8. Display image and three options for user
  9. Redirect user to a verdict: congratulations or incorrect
  10. Continue process with all given variables (i.e. learning food, etc.)
  11. Endgame

Code project with at least 3 references (sited):

http://appinventor.mit.edu/explore/ai2/tutorials.html

Images / video introducing your project and a working prototype (Please include: titles, music/VO and upload to YouTube to share the video):

Testing Document Photo:

Evaluation of final summative project and  your own reflection in I2P this semester:

This final summative project sure was a roller coaster ride. It started off really bad. My partner and I hadn’t decided what to make for our project and it was already two classes in! We were able to quickly turn this around as we out additional time in at home. I think our final product is better than what I expected it to be. The reason is that we used a website that we weren’t familiar with at all and it required a lot of independent research to get started. I think my partner, Hanna and I worked exceptionally well with each other and our teamwork definitely helped to make our project a success.

I think that the I2P course is a lot more than just programming. Ms Mok has taught us different ways to problem solve through a lot of collaborative work which I think is one of the most important takeaways as this course comes to an end. This course has pushed me to solve problems on my own rather than to depend on friends or the teacher for the answer.

 

Balance Board Requirements

Introduction

For this summative, our challenge was to make a timer for a balance board using the Makey-Makey device. As soon as the balance board gets off the ground, the timer must start. When the board hits the ground it should stop the timer and put it on a list along with your name. Two versions of the code were made, one from scratch, and on python.

Planning Process

As part of the planning process, we made a flow chart and a pseudo code. We had to use Tkinter, however, tkinter was very complex. Scratch, on the other hand, was simple and easy to use. The flow chart and pseudo code did help us, but my partner and I did think we didn’t need them to complete our code.

Flow Chart:

The flowchart starts with a key being pressed, if the key is pressed, it means the board is on the ground, so the timer will stop when a key is pressed and will start when a key is not pressed. At the end, it asks for a name and records your time into a high score list.

The Pseudo Code

Check if a key is pressed:

If a key is pressed, keep checking.

If a key is not pressed, start the timer.

Time starts at 00:00

Every 1 second, add one to the underlined part of 00:00

When the underlined part reaches 60, add one to the not underlined part and the underlined part goes back to 0

When a key is pressed, stop the timer.

Ask for name

Record the name and time of a separate text file

End

The pseudo code and flowchart were too simple to translate into the Tkinter version of the code, so it was a big challenge.

Scratch:

As you can probably see, the scratch version of my code is very similar to my pseudo code.  Scratch makes the whole thing a lot more simply because it is just a beginner’s coding platform.

The last three blocks might be confusing, so here is an explanation:

“Time” is a variable that I made.  Anything can be in the place of “Time”.  When it says set Time to the timer, it means to set the variable time to whatever the timer says.  For example, if my time is 13 seconds, it would register “Time” as 13.

It will then say your time for 5 seconds.

Then it will add your answer from the previous question “What’s your name” and your time to a list called times.

Video of Steve, my partner, showing the code works:

Version 2:

Video of Steve showing our bad code:

Honestly, I had no idea what to do with Tkinter, but Steve, being more experienced and smarter in the coding field got close.

 

Raw Code:

#importing Tkinter
import tkinter as tk
from tkinter import *
from time import time
root = tk.Tk()#makes a window
timestr = ’00:00′

class Stopwatch:#making the class called stop wathc
def __init__(self):
self.display = tk.Label(root, text=’00:00′, width=20)# It will display the text as 00:00 and its width will be 20
self.display.pack()#packing it into the window
self.paused = True

def toggle(self, event):#event means I will be able to bind it to something
if self.paused:
self.paused = False
self.oldtime = time()
self.runtimer()

else:
self.paused = True
self.oldtime = time()

def run_timer(self):
if self.paused:
return
delta = int(time() – self.oldtime)
timestr = ‘{:02}:{:02}’.format(*divmod(delta, 60))
self.display.config(text=timestr)
self.display.after(1000, self.run_timer)

frame = Frame(root, width = 200, height = 200)#making a frame
root.bind(“<KeyRelease-Right”, toggle)#binding the release of the right arrow key with the function toggle
root.bind(“<KeyRelease-Left>”, toggle)#binding the release of the left arrow key with the function toggle
root.bind(“<Right>”, toggle)#binding the right arrow key with the function toggle
root.bind(“<Left>”, toggle)#binding the left arrow key with the function toggle
frame.pack()#making a frame

root.mainloop()

The Quiz Summative Final

Flow Chart

Pseudo Code:

Functions at the top

Math:

1) Solve for x: 3x=9 (3)

2) For x = 5, solve 2x+2 (12)

3) What is the value of pi? (3.14)

Science:

  1. What is the chemical formula of water? (H2O)
  2. What do humans need to breathe? (Oxygen)
  3. What percent of the human body is made up of human water. NOTE: Don’t percent symbol in the final answer      (60)

English:

  1. What percent of the english language comes from greek and latin roots?    (60)
  2. you must retype the following sentence correctly: in you. We trust.  (We trust in you.)
  3. What do you call the following: .,?!    (punctuation)

History:

  1. Who was the first president of the United States of America?   (George Washington)
  2. When did the 100 year war end? (1453)
  3. What legal document ended slavery in America? (Emancipation Proclamation)

Common sense:

  1. Where do you take someone who is in need of medical help? (Hospital)
  2. How many times you can subtract the number 5 from 25?  (Once)
  3. Is it legal for a man to marry his widow.    (NO)

Main program here:

Take the name of the user and introduce the quiz. There will be 15 questions, three for the following five sections: math, science, english, history, and common sense.

 

Code video:

 

Testing Document:

https://docs.google.com/a/hkis.edu.hk/spreadsheets/d/1gxRDiPnON8lmUS4Ewdr-5zvbKYlFrPUqQCe4mDUc2QE/edit?usp=sharing

 

Error pictures:

 

Comments:

I think my code is very simple and easy to follow. 99% of my code is under functions. I did this because functions are very easy to use, and in my opinion, save a lot of time. I also think making functions is very useful as you don’t have to repeat the same piece of code multiple times. For example, in my code, every time you get the question right, I call up the function called correct, instead of typing the message “Correct! You got the question right!”.

3 References:

https://www.codementor.io/kaushikpal/user-defined-functions-in-python-8s7wyc8k2

http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/ifstatements.html

https://docs.python.org/3/tutorial/controlflow.html

Lesson 1+2 Summative

Untitled

I have completely finished my code, while running the test, as you can see the run through above, in the last section of my code, no matter the answer, the code always tells you correct even though in my function it says that there is a specific answer, and if that answer is not entered it goes through the else. I need to find how to fix this problem.

I asked Yuto to go through my code, and he said that it runs very smoothly, and is very straightforward. He recommended that I add multiple possibilities for word answers, for example, the answer oxygen should include oxygen and Oxygen.

Lesson 7

def inputData():
    number = int(input("Enter a number:"))
    return number

def processData(number):
    if number % 2 ==0: #divisible by 2
        return True
    elif number % 3 ==0: #divisible by 3
        return True
    elif number % 5 ==0: #divisible by 5
        return True
    elif number % 7 ==0: #divisible by 7
        return True
    else:
        return False

def outputData(number, result):
    if result:
        print("The number",(number),"is not a prime number.")
    else:
        print("The number",(number), "is a prime number.")

def main():
    userNumber = inputData()
    result = processData(userNumber)
    outputData(userNumber, result)

main()

Today in class, we worked with programming functions. 
Personally, I find coding functions not too difficult, the only thing I can work on is setting up the function. After that, setting up the statements is quiet easy.

Functions (Lesson 6)

Today we learned how to setup functions. I think that functions are similar to variables. They are set up by putting def example():. Example is the name of the function. Inside the parentheses are inputs/arguments. Functions are used to remember things, and when you need them, you just call the function. I find setting up functions not that hard. They also use if, elif, and else statements.

Guess my word

Today we did an activity similar to last class guess my number, but now it is guess my word. My code consists of hints for the user to get close to my word and also if, elif, and else statements. My program is very simple and straightforward which is good, however, it can very easily be broken and may not work in some cases. Also, I need to incorporate a while statement to allow a loop. If I do this it will fix a lot of my problems in the code.

Lesson 4

Today in class we did a lot of programming revolving around while, if, elif, and else statements. I think that I can use if, elif, and else statements for variables and asking the user to choose different things. I need more work with while statements because I don’t quite understand them and don’t know how to implement them into my code. I believe that to have else statements while statements are required. My limited knowledge of while statements are that they create a loop, and else statements involve the user putting in a variable that doesn’t exist. If this is the case, the user would have to put in another answer but they can’t-do that if there is no while statement for them to put in an answer again.