15,124,780 members
See more:
```a = "Hello, world!"
print(a[-5:-2])
question = input("Do you want to convert " + a +" in upper case? " )

if question == str( 'Yes' or 'yes'):
print(a.upper())
else:
question2 = input("Do you want to " + a + "into lower case? ")
if question2 == str( 'Yes' or 'yes'):
print(a.lower())```

What I have tried:

i have tried changing it several times i dont know what should i do any idea whats the issue?
Posted
Updated 13-Jun-21 11:06am

## Solution 2

`i dont know what should i do any idea whats the issue?`

The issue is that you didn't read the documentation.
It happen the programming languages are no plain english, you need to learn how to express what you want to do.
This is not Python:
Python
```if question == str( 'Yes' or 'yes'):
print(a.upper())```

You have to transform to:
Python
```if question == 'Yes' or question == 'yes':
print(a.upper())```
CPallini 14-Jun-21 2:18am

'Documentation'? 'Documentation', no less!
5.
Patrice T 14-Jun-21 2:22am

Thank you
Lakshay Sahu 15-Jun-21 15:10pm

haha actually i am just a newbie
Patrice T 15-Jun-21 16:22pm

I guessed you are a newbie, because this mistake is done only by newbies. :)
How to build a complex condition is something you learn by reading documentation, or by following good tutorial, but you don't guess.

## Solution 1

Try this:
Python
```a = "Hello, world!"
print(a[-5:-2])
question = input("Do you want to convert " + a +" in upper case? " )

if question == 'yes':
print(a.upper())
else:
question2 = input("Do you want to " + a + "into lower case? ")
if question2 == 'yes':
print(a.lower())```
CPallini 14-Jun-21 2:17am

5.
Lakshay Sahu 15-Jun-21 15:09pm

what was the issue
OriginalGriff 15-Jun-21 15:53pm

Compare your code - which doesn't work - with mine - which does.
It should be pretty obvious what you did wrong! :laugh:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Top Experts
Last 24hrsThis month
 OriginalGriff 155 Chris Copeland 120 k5054 105 Richard MacCutchan 95 Stefan_Lang 60
 OriginalGriff 1,145 Richard MacCutchan 510 Richard Deeming 400 Stefan_Lang 270 CPallini 260

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900