Skip to content

Instantly share code, notes, and snippets.

@Bundi-py
Last active December 23, 2019 16:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Bundi-py/c0641bebf9e2addb18f19a9e1b79a027 to your computer and use it in GitHub Desktop.
Napravi programčić gde korisnik može da unese željenu širinu i visinu budućeg pravougaonika/kvadrata.
x = int(input('Širina: '))
y = int(input('Visina: '))
if x < 2 or y < 2:
print('Suviše mali broj.')
else:
print('*' * x)
for i in range (y-2):
print('*' + ' ' * (x - 2) + '*')
print('*' * x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment