[Tutor] Fwd: Beginner struggling with python.

Alan Gauld alan.gauld at yahoo.co.uk
Fri Jun 23 20:27:05 EDT 2023


On 23/06/2023 08:22, Jack Simpson wrote:

> I tried to use the string.upper() and it returned this syntax error. 

The server strips attachments as security risks. You will need to
cut 'n paste the text (or retype it as a last resort)

But please explain what you are trying to do. Is it to create
your own function to create upper case strings? Or is it to
use the builtin function(strictly speaking a method of the
string class)

Show us before and after data(what you want to do)
Show us sample code (how you tried to do it)
Show us any error messages (what Python thought of your code)

> tried def upper() and upper(). 

Those are two entirely different things. How you tried
them should have been different too. But we can't tell.

> I also tried underscores and spaces within
> the string in the parenthesis which produced a similar result but the issue
> was with the  code within the string. 

That makes no sense whatsoever until you show us. underscores
and spaces should have absolutely no effect in uppercase transformations.


> I am on a work computer using an
> interpreter so please forgive the photos from my phone.

I assume that means you took photos of your work computer
with your phone? Can you not send text email from your
work computer? That would allow you to paste code/errors etc
into the email.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos





More information about the Tutor mailing list