Skip to content

Instantly share code, notes, and snippets.

@marcellmars
Created November 23, 2021 21:30
  • 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
Embed
What would you like to do?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marcellmars
Copy link
Author

ispis kako ga oni traže sa zarezom iza svakog broja osim zadnjeg ne znam kako napravit a da ne izgleda prenabrijano. npr:

x = int(input("Unesi broj za varijablu x:"))
y = int(input("Unesi broj za varijablu y:"))
if x == y:
    print("Uneseni brojevi su jednaki. Njihov umnožak iznosi:", x*y)
elif x > y:
    print("Ispis:", str([i for i in range(x, y-1, -1)])[1:-1])
else:
    print("Ispis:", str([i for i in range(x, y+1)])[1:-1])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment