I am stuck on this code, Pls someone should assist
Your code so far
# User Editable Region
alphabet = 'abcdefghijklmnopqrstuvwxyz'
shift = 5
# First part: from index 5 to the end
shifted_alphabet = alphabet[shift:]
print(shifted_alphabet)
# Concatenate the missing first part to complete the shift
shifted_alphabet = alphabet[0:5] + alphabet[shift:]
print(shifted_alphabet)
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
I would suggest you reset and try again. You have added too many lines of code. You work on the code that is already there.
You are working on the variable shifted_alphabet. It says you need to concatenate the missing 5 letters to the end of the shifted _alphabet variable. You haven’t done this.
The example code tells you how to extract a portion from a variable. Instead of hard coding how you originally did it think of the variables you already have and how they can be used here.