Got stack help me please


#1

Code:

print len("My_String")
print my_string.upper()
my_string="parrot"

Output:

9 PARROT None...............

some body please help me in python chapter 16.why cant i continue yet the results are corect thanks.


#2

Hi @arcpro38645,

Please give the exercise link. Thank you! :slightly_smiling:


#3

strings and console out put


#4

Hi try to remove the " " around my_string inside the len( ) and also remove the uppercase M inside it.


#5

Traceback (most recent call last):
  File "python", line 3, in <module>
NameError: name 'my_String' is not defined

#7

thanks but mine is like that too .in the console i get 9
PARROT
None
what it the problem


#8

Here how your cold should be

print len(my_string)
print my_string.upper()
my_string="parrot"

And if it doesn't work try it like that first the variable and then the prints

my_string="parrot"
print len(my_string)
print my_string.upper()

#9

You get 9 Becaus Its was printing the len of my_string wich is 9


#10

yeah look here are the questions
On line 3, create the variable my_string and set it to any string you'd like.
On line 4, print the length of my_string.
On line 5, print the .upper() case version of my_string.


#11

yeah buh i think it is correct why cant i continue man btw thenks


#12

What the error that you get now?


#13

Oops, try again. Did you remember to print len(my_string)?


#14

Can you Post your code.


#15

Write your code below, starting on line 3!

my_string="parrot"
print len("my_String")
print my_string.upper()


#16

Here how it should be

my_string = "parrot"
print len(my_string)
print my_string.upper()

#17

Traceback (most recent call last):
File "python", line 4, in
NameError: name 'my_String' is not defined


#18

what does none mean in the console?


#19

thanks bro i made it in the first line it should be like this my_string="parrot!"


#20

@arcpro38645 Is your problem solved?


#21

yeah thanks cant belief i made it by myself.....thenks