From 87e0c38eaf8186e9a442d560665f6f687693f557 Mon Sep 17 00:00:00 2001 From: Michael Mutote <130656746+mr1Michael@users.noreply.github.com> Date: Wed, 11 Oct 2023 19:54:55 +0200 Subject: [PATCH] 22202956 question 1 corrected and question 4 completed --- 2.7 Exercises.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/2.7 Exercises.py b/2.7 Exercises.py index 8c5dbe2..8c9740d 100644 --- a/2.7 Exercises.py +++ b/2.7 Exercises.py @@ -1,7 +1,16 @@ # question 1 +def rotateR(val): + return [val[-1]] + val[1:len(val)] + val[0] + + + + + + -def rotateR(val): - val[0],val[-1] = val[-1],val[0] +# question 4 +def rotateRx(val): + val[0],val[-1] = val[-1], val[0] -- GitLab