jeudi 5 décembre 2019

Python: Enter 4 Seperate Numbers, Print All Possible Sequences

It's been a few years since ive touched python at all, and i want to get back into it by learning how to create some simple programs, the first is as follows:

The user is prompted to enter four seperate numbers,

So:

num1 = int(input("Enter First Number: "))
num2 = int(input("Enter Second Number: "))
num3 = int(input("Enter Third Number: "))
num4 = int(input("Enter Fourth Number: "))

Thats the base line which will prompt the user

My end goal is for the program to output these numbers in all sequences possible with the MAX value entered being '9' and the lowest being '0', nothing higher than 9, nothing lower than 0.

Errors ideally will be shown if the user breaks these value 'rules'

If there are no errors, the user will be shown as an example as follows, providing the input was 1 2 3 4:

4321, 2431, 1111, 3331, 2223

etc...

Any help will be insanely appreciated

Thanks in advance

Acryaz




Aucun commentaire:

Enregistrer un commentaire