"smallest program to make diamond python" Code Answer's
You're definitely familiar with the best coding language Python that developers use to develop their projects and they get all their queries like "smallest program to make diamond python" answered properly. Developers are finding an appropriate answer about smallest program to make diamond python related to the Python coding language. By visiting this online portal developers get answers concerning Python codes question like smallest program to make diamond python. Enter your desired code related query in the search bar and get every piece of information about Python code related question on smallest program to make diamond python.
smallest program to make diamond python
h = eval(input("please enter diamond's height:"))
for i in range(h):
print(" "*(h-i), "*"*(i*2+1))
for i in range(h-2, -1, -1):
print(" "*(h-i), "*"*(i*2+1))
# please enter diamond's height:4
# *
# ***
# *****
# *******
# *****
# ***
# *
#
# 3, 2, 1, 0, 1, 2, 3 space
# 1, 3, 5, 7, 5, 3, 1 star
# please enter diamond's height:5
# *
# ***
# *****
# *******
# *********
# *******
# *****
# ***
# *
#
# 4, 3, 2, 1, 0, 1, 2, 3, 4 space
# 1, 3, 5, 7, 9, 7, 5, 3, 1 star
Source: stackoverflow.com
All those coders who are working on the Python based application and are stuck on smallest program to make diamond python can get a collection of related answers to their query. Programmers need to enter their query on smallest program to make diamond python related to Python code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about smallest program to make diamond python for the programmers working on Python code while coding their module. Coders are also allowed to rectify already present answers of smallest program to make diamond python while working on the Python language code. Developers can add up suggestions if they deem fit any other answer relating to "smallest program to make diamond python". Visit this developer's friendly online web community, CodeProZone, and get your queries like smallest program to make diamond python resolved professionally and stay updated to the latest Python updates.