Diamond print with * in python print("Diamond printing") num = int(input("Enter num how many num you want : ")) for i in range(num,0,-1): for j in range(i,0,-1): print("*", end=" ") for j in range(2*(num-i)): print(" ",end=" ") for j in range(i,0,-1): print("*", end=" ") print() for i in range(num): for j in range(i+1): print("*", end=" ") for j in range(2*(num-i-1)): print(" ",end=" ") for j in range(i+1): print("*", end=" ") print()
Here is the first things you should consider doing before start coding 1) Setup your personal blog on bloger or any free hosting website On this blog you are going to deploy/uplode your program's code. no need to do any fanci stylish thing just uplode the raw code so that you can access it from any where. Just don't think that first i'm going to learn coding then i will start a website or blog. Advantages of doing that- a) You can access it frome any where, you can sand it or show it to anyone. b) It will work like a backup, if your computer got corupte the blog will save your life. If you are using GitHub then you dont have to do this but if are learning things seting up a blog is easy. but that dose not mean you should not learn GitHub. GitHub a must learning thing for you if you are learning coding. If you don't want yo lose your focuse from your coding language you should setup a blog. That all for today have a nice day Thankyou for reading