

The code for the 4th part will be:- if row+col=8: The ‘*’ is printed where the sum of row no. Note:-Here Row 5 and column 3 is available in both parts, i.e., part 3 and In the fourth part, the marked positions are:. So, the code for the 3rd part will be:- if row-col=2: It can be observed that the ‘*’ is available at those positions in part 3 where the difference of row and column is 2. In the third part the marked position are:.

So, the code for the 2nd part will be:- if row =1 and col%3=0: In it, only column 0,3 and 6 are filled with ‘*’. The condition for Row 1 is opposite of the Row 0. So, the code for the 1st part will be:- if(row=0 and col%3!=0): #Here col represents column In Row 0,the ‘*’ is printed in column 1,column 2,column 4 and column 5. Writing Code for different parts of Pattern Note:-If you want, you can remove row 2.This will also result in a similar heart pattern.

The 4th part represents the area from row 3 to row 6 and from column 1 onwards. The 3rd part represents the area from row 0 to row 3 and from column 1 onwards. The 1st part and 2nd part consist of zeroth and 1st column respectively. But, we will make this pattern by breaking it down into 4 parts:. There exist multiple ways to make this pattern. Is mentioned at the top whereas the index of each column is mentioned at the left. Here, a grid with 7 rows and 6 columns is formed. The pattern we will be making can be visualized using a grid(or a 2D-Matrix). For a proof of concept, I just chose the heart image that we created from the first idea by saving the image calling plt.savefig(‘heart.png’). Visit in the near future, and I created a variable called words to store these names. Personally, for the string, I just listed a bunch of cities and countries that we have visited or plan to I chose the red color as that’s the theme color for the Valentine’s Day.

In addition, I wrote another function that generates random red colors with the same hue, saturation, but different lightness. To do that, we’ll use the wordcloud, imageio, and matplotlib libraries.įunction that takes in a string, an image file that provides the mask for the word cloud, and the destination image file for the created word cloud. The last idea that I’d like to share is that you can create a word cloud for your loved one. You can refer to my previous article for further detailed instruction. Run the following code in your IDE.Īctually, you can also create animated images from a video clip. Valentine’s Day, and drop them in a folder called “source_images”, for example. In your photo album, find 10 or more images that are appropriate for the As above, your computer needs to have the imageio library installed. You can play with the code to change the size, resolution, and even color! I’ll leave these tasks to you if you’re bold enough to use this gift idea :)Īnother interesting thing to do is to create animated images using the imageio library, which can generate animated images from individual static images. Run the above code, and you’ll see a red heart as below.
#CARA ALBUM FB TEMAN SERIES#
(x**2+y**2–1)**3-x**2*y**3=0, in which ** means exponentiation to the power of the number following the symbol, to generate a series of points contributing to the heart shape. Copy and paste the following code in your own Python IDE. Thus, please first make sure you have both installed on your computer, such as by installing them using the pip tool. The first easy thing for you to do is to draw a heart shape using the numpy and mtaplotlib libraries. However, just a quick disclaimer, use them at your own risk, as it’s a recommendation from a so-called “nerd” or “geek”:) Show Your Heart In this article, I would like to share three cool mini-projects that can potentially be gift ideas. In the last couple of years, I’ve started to use Python a lot more than before, and found some interesting projects that can be done with just a few lines of code. This year, I guess that I’ll do something different.
#CARA ALBUM FB TEMAN BLUETOOTH#
Make the mistake again by sending her a weight scale, which made her really mad, although I thought a digital stainless steel smart scale supporting Bluetooth was really cool. Most of the time, I just send her some flowers with a gift card, because I just didn’t want to Picking the right gift is usually a very challenging task for me, as I’m just not a creative person in the romance domain. I’ve not decided what gift I’ll give to my wife. Valentine’s Day is just around the corner. Photo by Jesse Goll on Unsplash Write some code to make something cool for your valentine.
