Python Forum
I need help writing this code for string properties and methods
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need help writing this code for string properties and methods
#1
write a program in which a person enter their name in the following format: Mary May Rest. The program should then output the person's name and the initial of their middle name
Reply
#2
Sounds like input and a loop would do the trick.
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply
#3
(Mar-22-2021, 01:31 AM)hannah71605 Wrote: I wrote it and then due to an internet error it didn't save.
Then write it again it's as short as 2 lines of code and definitely shorter than your current post.
We are glad to help, but we are not going to do your homework for you.
(Mar-22-2021, 01:35 AM)menator01 Wrote: and a loop
not sure what the loop would be needed for :-)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#4
(Mar-22-2021, 01:31 AM)hannah71605 Wrote: write a program in which a person enter their name in the following format: Mary May Rest. The program should then output the person's name and the initial of their middle name
Can someone please write this code? I wrote it and then due to an internet error it didn't save. I would really appreciate it

If you wrote it once, you can write it again. Seriously. You can write out your algorithm in simple sentences, because you have already worked it out, and then translate those simple sentences to Python. The exercise will be good for you.
Reply
#5
(Mar-22-2021, 05:32 AM)buran Wrote:
(Mar-22-2021, 01:31 AM)hannah71605 Wrote: I wrote it and then due to an internet error it didn't save.
Then write it again it's as short as 2 lines of code and definitely shorter than your current post.
We are glad to help, but we are not going to do your homework for you.
(Mar-22-2021, 01:35 AM)menator01 Wrote: and a loop
not sure what the loop would be needed for :-)

I mis-read. No loop just for first letter of one word.
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help in Code for Writing View Functions in Flask - Python Web Framework ashishsme14 2 3,037 May-22-2020, 03:43 AM
Last Post: snippsat
  Sort objects by protected properties. Sigriddenfeta 1 1,889 Mar-17-2020, 04:11 AM
Last Post: Larz60+
  HELP - Writing code returning True or False Kokuzuma 2 2,792 Nov-01-2018, 03:37 AM
Last Post: Kokuzuma
  Creating a script with a class have specific properties dvldgs05 13 5,832 Oct-15-2018, 08:54 PM
Last Post: dvldgs05
  newbie questions about objects properties... slowbullet 2 2,641 Aug-12-2018, 01:12 PM
Last Post: Gribouillis
  Speed of progress of writing code Johno 2 2,887 Jan-19-2018, 01:56 AM
Last Post: dwiga
  Problem writing code with my pseudocode MattWilk97 1 2,884 Aug-29-2017, 01:54 AM
Last Post: ichabod801
  Need Help with writing this code!? r6lay 7 5,896 Feb-13-2017, 10:03 AM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020