SlideShare a Scribd company logo
1 of 1
Using the string commands introduced in Lab 2, write a Python program that prompts the user
for a three-word phrase separated by comma (,). Create a new phrase, where those three words
are separated by spaces and in reversed order. That is, the first word in the input phrase is the last
word in the new phrase while the third word in the input phrase is the first word in the new
phrase. Print new phrase in upper case letters and lower case letters.
A sample run of your program should look like:
Another run:
Hint: Your program should be able to take any phrase the user enters and prints it, it in upper
case letters, and it in lower case letters. To do that, you need to store the phrase in a variable
and print variations of the stored variable. You also need to find those three words from the
resulting list after applying split method on the input string. Then concatenate those words to get
a new phrase.

More Related Content

Similar to Using the string commands introduced in Lab 2- write a Python program.docx

Similar to Using the string commands introduced in Lab 2- write a Python program.docx (10)

Maxbox starter
Maxbox starterMaxbox starter
Maxbox starter
 
qb unit2 solve eem201.pdf
qb unit2 solve eem201.pdfqb unit2 solve eem201.pdf
qb unit2 solve eem201.pdf
 
Ch-5.pdf
Ch-5.pdfCh-5.pdf
Ch-5.pdf
 
Ch-5.pdf
Ch-5.pdfCh-5.pdf
Ch-5.pdf
 
I1 geetha3 revathi
I1 geetha3 revathiI1 geetha3 revathi
I1 geetha3 revathi
 
Looping in PythonLab8 lecture slides.pptx
Looping in PythonLab8 lecture slides.pptxLooping in PythonLab8 lecture slides.pptx
Looping in PythonLab8 lecture slides.pptx
 
C programming perso notes
C programming perso notesC programming perso notes
C programming perso notes
 
Java programlist (1)
Java programlist (1)Java programlist (1)
Java programlist (1)
 
Introduction To Python
Introduction To  PythonIntroduction To  Python
Introduction To Python
 
python
pythonpython
python
 

More from StewartZQKChapmana

Using the information in the source table calculate the missing F and.docx
Using the information in the source table calculate the missing F and.docxUsing the information in the source table calculate the missing F and.docx
Using the information in the source table calculate the missing F and.docxStewartZQKChapmana
 
Using the Grid technique- solve for the following- 1) What is the to.docx
Using the Grid technique- solve for the following-   1) What is the to.docxUsing the Grid technique- solve for the following-   1) What is the to.docx
Using the Grid technique- solve for the following- 1) What is the to.docxStewartZQKChapmana
 
Using java complete the given program- -A- Create File -B- Add Student.docx
Using java complete the given program- -A- Create File -B- Add Student.docxUsing java complete the given program- -A- Create File -B- Add Student.docx
Using java complete the given program- -A- Create File -B- Add Student.docxStewartZQKChapmana
 
Use the properties of the mean and median to determine which are the c (1).docx
Use the properties of the mean and median to determine which are the c (1).docxUse the properties of the mean and median to determine which are the c (1).docx
Use the properties of the mean and median to determine which are the c (1).docxStewartZQKChapmana
 
Use this data to create the chart as in textbook Figure 3-19 Tcp cause.docx
Use this data to create the chart as in textbook Figure 3-19 Tcp cause.docxUse this data to create the chart as in textbook Figure 3-19 Tcp cause.docx
Use this data to create the chart as in textbook Figure 3-19 Tcp cause.docxStewartZQKChapmana
 
Use the magnitudes (Richter scale) of the 120 earthquakes listed in th.docx
Use the magnitudes (Richter scale) of the 120 earthquakes listed in th.docxUse the magnitudes (Richter scale) of the 120 earthquakes listed in th.docx
Use the magnitudes (Richter scale) of the 120 earthquakes listed in th.docxStewartZQKChapmana
 
Use the image and table above to define each body region term listed b.docx
Use the image and table above to define each body region term listed b.docxUse the image and table above to define each body region term listed b.docx
Use the image and table above to define each body region term listed b.docxStewartZQKChapmana
 
Use the following replicate data to fill the table below it-.docx
Use the following replicate data to fill the table below it-.docxUse the following replicate data to fill the table below it-.docx
Use the following replicate data to fill the table below it-.docxStewartZQKChapmana
 
Use the following information to answer questions 14 - 17 A recent pol.docx
Use the following information to answer questions 14 - 17 A recent pol.docxUse the following information to answer questions 14 - 17 A recent pol.docx
Use the following information to answer questions 14 - 17 A recent pol.docxStewartZQKChapmana
 
Use Linux system On USB 1- Build a Multi Partitioned USB that has a 32.docx
Use Linux system On USB 1- Build a Multi Partitioned USB that has a 32.docxUse Linux system On USB 1- Build a Multi Partitioned USB that has a 32.docx
Use Linux system On USB 1- Build a Multi Partitioned USB that has a 32.docxStewartZQKChapmana
 
True or false- (x)(x) True saiescanner.docx
True or false- (x)(x) True saiescanner.docxTrue or false- (x)(x) True saiescanner.docx
True or false- (x)(x) True saiescanner.docxStewartZQKChapmana
 
True or False 1- John Maynard Keynes' ideas were shaped by economic pr.docx
True or False 1- John Maynard Keynes' ideas were shaped by economic pr.docxTrue or False 1- John Maynard Keynes' ideas were shaped by economic pr.docx
True or False 1- John Maynard Keynes' ideas were shaped by economic pr.docxStewartZQKChapmana
 
Two Proportions Z hypothesis test Two variances F hypothesis test Two.docx
Two Proportions Z hypothesis test Two variances F hypothesis test Two.docxTwo Proportions Z hypothesis test Two variances F hypothesis test Two.docx
Two Proportions Z hypothesis test Two variances F hypothesis test Two.docxStewartZQKChapmana
 
True or False 1- Robert Heilbroner can be credited with the idea that.docx
True or False 1- Robert Heilbroner can be credited with the idea that.docxTrue or False 1- Robert Heilbroner can be credited with the idea that.docx
True or False 1- Robert Heilbroner can be credited with the idea that.docxStewartZQKChapmana
 
Understanding consolidated balances Assume an investor acquired 100- o.docx
Understanding consolidated balances Assume an investor acquired 100- o.docxUnderstanding consolidated balances Assume an investor acquired 100- o.docx
Understanding consolidated balances Assume an investor acquired 100- o.docxStewartZQKChapmana
 
Type your answers in all of the blanks and submit The class of tissues.docx
Type your answers in all of the blanks and submit The class of tissues.docxType your answers in all of the blanks and submit The class of tissues.docx
Type your answers in all of the blanks and submit The class of tissues.docxStewartZQKChapmana
 
Under the terms of the agreement- Tifiany will recelve the $214-000 ca.docx
Under the terms of the agreement- Tifiany will recelve the $214-000 ca.docxUnder the terms of the agreement- Tifiany will recelve the $214-000 ca.docx
Under the terms of the agreement- Tifiany will recelve the $214-000 ca.docxStewartZQKChapmana
 
Trust is- Select one- A- a psychological state that occurs when you al.docx
Trust is- Select one- A- a psychological state that occurs when you al.docxTrust is- Select one- A- a psychological state that occurs when you al.docx
Trust is- Select one- A- a psychological state that occurs when you al.docxStewartZQKChapmana
 
Two people can be exposed to the same stressor and act entirely differ.docx
Two people can be exposed to the same stressor and act entirely differ.docxTwo people can be exposed to the same stressor and act entirely differ.docx
Two people can be exposed to the same stressor and act entirely differ.docxStewartZQKChapmana
 
true or false- {x}{x} True False.docx
true or false- {x}{x} True False.docxtrue or false- {x}{x} True False.docx
true or false- {x}{x} True False.docxStewartZQKChapmana
 

More from StewartZQKChapmana (20)

Using the information in the source table calculate the missing F and.docx
Using the information in the source table calculate the missing F and.docxUsing the information in the source table calculate the missing F and.docx
Using the information in the source table calculate the missing F and.docx
 
Using the Grid technique- solve for the following- 1) What is the to.docx
Using the Grid technique- solve for the following-   1) What is the to.docxUsing the Grid technique- solve for the following-   1) What is the to.docx
Using the Grid technique- solve for the following- 1) What is the to.docx
 
Using java complete the given program- -A- Create File -B- Add Student.docx
Using java complete the given program- -A- Create File -B- Add Student.docxUsing java complete the given program- -A- Create File -B- Add Student.docx
Using java complete the given program- -A- Create File -B- Add Student.docx
 
Use the properties of the mean and median to determine which are the c (1).docx
Use the properties of the mean and median to determine which are the c (1).docxUse the properties of the mean and median to determine which are the c (1).docx
Use the properties of the mean and median to determine which are the c (1).docx
 
Use this data to create the chart as in textbook Figure 3-19 Tcp cause.docx
Use this data to create the chart as in textbook Figure 3-19 Tcp cause.docxUse this data to create the chart as in textbook Figure 3-19 Tcp cause.docx
Use this data to create the chart as in textbook Figure 3-19 Tcp cause.docx
 
Use the magnitudes (Richter scale) of the 120 earthquakes listed in th.docx
Use the magnitudes (Richter scale) of the 120 earthquakes listed in th.docxUse the magnitudes (Richter scale) of the 120 earthquakes listed in th.docx
Use the magnitudes (Richter scale) of the 120 earthquakes listed in th.docx
 
Use the image and table above to define each body region term listed b.docx
Use the image and table above to define each body region term listed b.docxUse the image and table above to define each body region term listed b.docx
Use the image and table above to define each body region term listed b.docx
 
Use the following replicate data to fill the table below it-.docx
Use the following replicate data to fill the table below it-.docxUse the following replicate data to fill the table below it-.docx
Use the following replicate data to fill the table below it-.docx
 
Use the following information to answer questions 14 - 17 A recent pol.docx
Use the following information to answer questions 14 - 17 A recent pol.docxUse the following information to answer questions 14 - 17 A recent pol.docx
Use the following information to answer questions 14 - 17 A recent pol.docx
 
Use Linux system On USB 1- Build a Multi Partitioned USB that has a 32.docx
Use Linux system On USB 1- Build a Multi Partitioned USB that has a 32.docxUse Linux system On USB 1- Build a Multi Partitioned USB that has a 32.docx
Use Linux system On USB 1- Build a Multi Partitioned USB that has a 32.docx
 
True or false- (x)(x) True saiescanner.docx
True or false- (x)(x) True saiescanner.docxTrue or false- (x)(x) True saiescanner.docx
True or false- (x)(x) True saiescanner.docx
 
True or False 1- John Maynard Keynes' ideas were shaped by economic pr.docx
True or False 1- John Maynard Keynes' ideas were shaped by economic pr.docxTrue or False 1- John Maynard Keynes' ideas were shaped by economic pr.docx
True or False 1- John Maynard Keynes' ideas were shaped by economic pr.docx
 
Two Proportions Z hypothesis test Two variances F hypothesis test Two.docx
Two Proportions Z hypothesis test Two variances F hypothesis test Two.docxTwo Proportions Z hypothesis test Two variances F hypothesis test Two.docx
Two Proportions Z hypothesis test Two variances F hypothesis test Two.docx
 
True or False 1- Robert Heilbroner can be credited with the idea that.docx
True or False 1- Robert Heilbroner can be credited with the idea that.docxTrue or False 1- Robert Heilbroner can be credited with the idea that.docx
True or False 1- Robert Heilbroner can be credited with the idea that.docx
 
Understanding consolidated balances Assume an investor acquired 100- o.docx
Understanding consolidated balances Assume an investor acquired 100- o.docxUnderstanding consolidated balances Assume an investor acquired 100- o.docx
Understanding consolidated balances Assume an investor acquired 100- o.docx
 
Type your answers in all of the blanks and submit The class of tissues.docx
Type your answers in all of the blanks and submit The class of tissues.docxType your answers in all of the blanks and submit The class of tissues.docx
Type your answers in all of the blanks and submit The class of tissues.docx
 
Under the terms of the agreement- Tifiany will recelve the $214-000 ca.docx
Under the terms of the agreement- Tifiany will recelve the $214-000 ca.docxUnder the terms of the agreement- Tifiany will recelve the $214-000 ca.docx
Under the terms of the agreement- Tifiany will recelve the $214-000 ca.docx
 
Trust is- Select one- A- a psychological state that occurs when you al.docx
Trust is- Select one- A- a psychological state that occurs when you al.docxTrust is- Select one- A- a psychological state that occurs when you al.docx
Trust is- Select one- A- a psychological state that occurs when you al.docx
 
Two people can be exposed to the same stressor and act entirely differ.docx
Two people can be exposed to the same stressor and act entirely differ.docxTwo people can be exposed to the same stressor and act entirely differ.docx
Two people can be exposed to the same stressor and act entirely differ.docx
 
true or false- {x}{x} True False.docx
true or false- {x}{x} True False.docxtrue or false- {x}{x} True False.docx
true or false- {x}{x} True False.docx
 

Recently uploaded

AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 

Recently uploaded (20)

AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 

Using the string commands introduced in Lab 2- write a Python program.docx

  • 1. Using the string commands introduced in Lab 2, write a Python program that prompts the user for a three-word phrase separated by comma (,). Create a new phrase, where those three words are separated by spaces and in reversed order. That is, the first word in the input phrase is the last word in the new phrase while the third word in the input phrase is the first word in the new phrase. Print new phrase in upper case letters and lower case letters. A sample run of your program should look like: Another run: Hint: Your program should be able to take any phrase the user enters and prints it, it in upper case letters, and it in lower case letters. To do that, you need to store the phrase in a variable and print variations of the stored variable. You also need to find those three words from the resulting list after applying split method on the input string. Then concatenate those words to get a new phrase.