diff --git a/src/ex2.py b/src/ex2.py index 2ce418ef..a589328f 100644 --- a/src/ex2.py +++ b/src/ex2.py @@ -49,3 +49,11 @@ # # return 0; # } + +week = int(input("Enter week number(1-7): ")) +days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] + +if 1 <= week <= 7: + print(days[week - 1]) +else: + print("Invalid input! Please enter week number between 1-7.") diff --git a/src/ex3.py b/src/ex3.py index 74592df6..299e47a8 100644 --- a/src/ex3.py +++ b/src/ex3.py @@ -41,3 +41,20 @@ # # return 0; # } + +textInput = input("Enter a famous name+surname, ex. BarackObama: ") +match textInput: + case "BarackObama": + print("44th president of the United States") + case "SandroPertini": + print("Former President of the Italian Republic") + case "NelsonMandela": + print("Former President of South Africa") + case "MahatmaGandhi": + print("Bapu") + case "DonaldKnuth": + print("Creator of LaTeX") + case "DennisRitchie": + print("Creator of C") + case _: + print("Invalid input! Please enter a good name!")