You know what’s more fun than coding..? Coding together with a friend!! So that's exactly what we're doing today!

I called my friend Beatrice and we created a design that becomes complete by putting two imagiCharms (or two phone screens) next to each other.

That is your challenge for #day8 - create a design together with a friend - you can create an image that needs more space than the 8*8 matrix provides or maybe make an animation jumping from one matrix to the other? 😉

When you share your project with the community make sure to add the tag #day8 🙌

For the example project, we used a data type called dictionary to map different colors to each day of the week. A dictionary is a collection of key-value pairs. In our case the day of the week is they key and the assigned color is the value. It works just like a real dictionary, where the words are the keys and their definitions are the values! In both types of dictionaries the keys are unique. However, there are some differences too. For example, Python dictionaries are not ordered, while word dictionaries are usually ordered alphabetically.

If you have any questions, you can ask on Discord!

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e365ecd2-47c4-4e50-a37a-a4bcb88c8529/Screenshot_2020-05-17_at_18.35.18.png

Friendship 🖤 code example:

# credits: @imagidori
# heart function that has two
# parameters: day of the week and
# left or right

def heart(day, lr):
	#this is the dictionary
	color_day = {
		"mo": R,
		"tu": B,
		"we": M,
		"th": A,
		"fr": Y,
		"sa": G,
		"su": O
	}
	c = color_day[day]
	if lr == "left":
		m[0][5] = c
		m[0][6] = c
		m[1][4] = c
		m[1][7] = c
		m[2][3] = c
		m[3][3] = c
		m[4][4] = c
		m[5][5] = c
		m[6][6] = c
		m[7][7] = c

#right heart
	if lr == "right":
		m[0][1] = c
		m[0][2] = c
		m[1][0] = c
		m[1][3] = c
		m[2][4] = c
		m[3][4] = c
		m[4][3] = c
		m[5][2] = c
		m[6][1] = c
		m[7][0] = c

heart("mo", "left")
#heart("mo", "right")

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/ef555c4c-393e-458c-a133-06522b59571a/IMG_5357.jpg

Monday

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/262ef88d-a880-4dab-99f8-5d7c198a91db/IMG_5361.jpg

Tuesday

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/3d88a157-8599-43bf-96d5-7f43585ffbc9/IMG_5364.jpg

Wednesday

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2ccfdf4b-39f7-4f73-98fe-e2c7fff1a1be/IMG_5356_2.jpg

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/dbb239d2-5127-4961-bb1c-7bfa561c0a6c/IMG_5362.jpg

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2f43d7f5-869e-4db1-b4b1-19ed1897d246/IMG_5363.jpg

https://www.youtube.com/watch?v=oilxtFezCko&feature=youtu.be