From c0f77aa87207f347c363c97a67ba3e34ed1a2e0c Mon Sep 17 00:00:00 2001 From: dipu007 <72186394+dipu007@users.noreply.github.com> Date: Thu, 1 Oct 2020 15:00:15 +0530 Subject: [PATCH] Update for.py --- Basics/for.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Basics/for.py b/Basics/for.py index c536615d..a96d19c0 100644 --- a/Basics/for.py +++ b/Basics/for.py @@ -40,6 +40,15 @@ def ex_print_shape(): for j in range(i): s += '*' print(s) + + # PRINT A SHAPE LIKE HEART + for i in range(5): + for j in range(7): + if(i==0 and j%3!=0) or (i==0 and j%3==0) or (i-j==2) or (i+j==8): + print("*",end=" ") + else: + print(" ",end=" ") + print() def ex_heads_tails():