Skip to content

Instantly share code, notes, and snippets.

@marcellmars
Created November 23, 2021 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcellmars/147f39c5d6bf786b52b4c804f6388f46 to your computer and use it in GitHub Desktop.
Save marcellmars/147f39c5d6bf786b52b4c804f6388f46 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
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