Learn String Manipulation by Building a Cipher - Step 11

Tell us what’s happening:

Modify your print(shift) call to print the data type of your shift variable.
I believe the code for the given question should be this way:
text = ‘shift’
print(type(text))
to determine the data type of the variable shift in this case.
Thank you for your time and help

Your code so far


# User Editable Region

text = 'Hello World'
print(type(text))
text2 = 'shift'
print(type('shift'))




# 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/123.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 11

Original code:

text = 'Hello World'
print(type(text))
shift = 3
print(shift)

You’ve renamed the shift variable to text2.

Since you no longer have a line that assigns shift = the shift variable no longer exists.

Reset the step, you just need to modify this line:

print(shift)

Instead of printing the shift variable, print the type of variable it is. Just as you’ve done with text in the previous line.

text2 = 'shift'
# This creates a new variable called text2

print(type('shift'))
#this will print the type of object that the string 'shift' is.

tried it this way, it still does not work. Thank you for your feedback .
Kind regards

Please share your updated code

i managed to find it
the answer was : print(shift) to determine the data type of shift where shift had a value of 3
code :

shift = 3
print(shift)

That’s not it but you should not put the solution code here in any case. :+1:

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').