Skip to content

Instantly share code, notes, and snippets.

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

marcellmars commented Nov 23, 2021

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