SlideShare a Scribd company logo
1 of 1
Use Python
Write a program that firstly creates a list and initializes it with the following numbers:
1, 2, 3, 4, 5, 6
Then, use a for loop to iterate over each element by their index numbers , and raise each
element to the power of 2 (modify each element's value to its square). Finally, print out the
modified list.
The original list is [ 1 , 2 , 3 , 4 , 5 , 6 ] The modified list is [ 1 , 4 , 9 , 16 , 25 , 36 ]

More Related Content

More from JamesZ96Nashl

Use induction to show that n!-2n for all integers n4-.docx
Use induction to show that n!-2n for all integers n4-.docxUse induction to show that n!-2n for all integers n4-.docx
Use induction to show that n!-2n for all integers n4-.docxJamesZ96Nashl
 
Use Figure 2a to answer questions 69- Assume Stars A and B are the sam.docx
Use Figure 2a to answer questions 69- Assume Stars A and B are the sam.docxUse Figure 2a to answer questions 69- Assume Stars A and B are the sam.docx
Use Figure 2a to answer questions 69- Assume Stars A and B are the sam.docxJamesZ96Nashl
 
Use appropriate SFR and a Modifier to configure bits 2 and 12 of port.docx
Use appropriate SFR and a Modifier to configure bits 2 and 12 of port.docxUse appropriate SFR and a Modifier to configure bits 2 and 12 of port.docx
Use appropriate SFR and a Modifier to configure bits 2 and 12 of port.docxJamesZ96Nashl
 
urrent Attempt in Progress Companies that use GAAP do not have any gui.docx
urrent Attempt in Progress Companies that use GAAP do not have any gui.docxurrent Attempt in Progress Companies that use GAAP do not have any gui.docx
urrent Attempt in Progress Companies that use GAAP do not have any gui.docxJamesZ96Nashl
 
Unix a- Use a pipe and the grep command to show only the files in the.docx
Unix a- Use a pipe and the grep command to show only the files in the.docxUnix a- Use a pipe and the grep command to show only the files in the.docx
Unix a- Use a pipe and the grep command to show only the files in the.docxJamesZ96Nashl
 
Unilever's branding of Dove (with Dove Facewash- Dove Bodywash- Dove e.docx
Unilever's branding of Dove (with Dove Facewash- Dove Bodywash- Dove e.docxUnilever's branding of Dove (with Dove Facewash- Dove Bodywash- Dove e.docx
Unilever's branding of Dove (with Dove Facewash- Dove Bodywash- Dove e.docxJamesZ96Nashl
 
uestion 2 Audrey woked a part time iot during colege to help pay lor v.docx
uestion 2 Audrey woked a part time iot during colege to help pay lor v.docxuestion 2 Audrey woked a part time iot during colege to help pay lor v.docx
uestion 2 Audrey woked a part time iot during colege to help pay lor v.docxJamesZ96Nashl
 
Types of Audit Evidence Auditors must gather a combination of many typ.docx
Types of Audit Evidence Auditors must gather a combination of many typ.docxTypes of Audit Evidence Auditors must gather a combination of many typ.docx
Types of Audit Evidence Auditors must gather a combination of many typ.docxJamesZ96Nashl
 
Type of disability which is AUTISM SPECTRUM DISORDER (ASD) and describ.docx
Type of disability which is AUTISM SPECTRUM DISORDER (ASD) and describ.docxType of disability which is AUTISM SPECTRUM DISORDER (ASD) and describ.docx
Type of disability which is AUTISM SPECTRUM DISORDER (ASD) and describ.docxJamesZ96Nashl
 
Tutorial Questions- Week 3 1- Explain what is meant by the term organi.docx
Tutorial Questions- Week 3 1- Explain what is meant by the term organi.docxTutorial Questions- Week 3 1- Explain what is meant by the term organi.docx
Tutorial Questions- Week 3 1- Explain what is meant by the term organi.docxJamesZ96Nashl
 
True or False- Based on the shapes of the graphs below- there is varia.docx
True or False- Based on the shapes of the graphs below- there is varia.docxTrue or False- Based on the shapes of the graphs below- there is varia.docx
True or False- Based on the shapes of the graphs below- there is varia.docxJamesZ96Nashl
 
To which of the following investments MUST equity accounting be applie.docx
To which of the following investments MUST equity accounting be applie.docxTo which of the following investments MUST equity accounting be applie.docx
To which of the following investments MUST equity accounting be applie.docxJamesZ96Nashl
 
True of False- all SCIS are created equally- Question 11 options- Ques.docx
True of False- all SCIS are created equally- Question 11 options- Ques.docxTrue of False- all SCIS are created equally- Question 11 options- Ques.docx
True of False- all SCIS are created equally- Question 11 options- Ques.docxJamesZ96Nashl
 
Time reversal- Let (Bt-t0) be a Brownian motion- Show that the process.docx
Time reversal- Let (Bt-t0) be a Brownian motion- Show that the process.docxTime reversal- Let (Bt-t0) be a Brownian motion- Show that the process.docx
Time reversal- Let (Bt-t0) be a Brownian motion- Show that the process.docxJamesZ96Nashl
 
Transitioning to land included what modifications to gills- Enlarging.docx
Transitioning to land included what modifications to gills- Enlarging.docxTransitioning to land included what modifications to gills- Enlarging.docx
Transitioning to land included what modifications to gills- Enlarging.docxJamesZ96Nashl
 
Three fair dice are rolled- Let the random variable X represent the su.docx
Three fair dice are rolled- Let the random variable X represent the su.docxThree fair dice are rolled- Let the random variable X represent the su.docx
Three fair dice are rolled- Let the random variable X represent the su.docxJamesZ96Nashl
 
Tnix Company's ledger on July 31- its fiscal year-end- includes the fo.docx
Tnix Company's ledger on July 31- its fiscal year-end- includes the fo.docxTnix Company's ledger on July 31- its fiscal year-end- includes the fo.docx
Tnix Company's ledger on July 31- its fiscal year-end- includes the fo.docxJamesZ96Nashl
 
This week- share with us important or interesting art where you live--.docx
This week- share with us important or interesting art where you live--.docxThis week- share with us important or interesting art where you live--.docx
This week- share with us important or interesting art where you live--.docxJamesZ96Nashl
 
Three different methods of teaching English are used on three group of (1).docx
Three different methods of teaching English are used on three group of (1).docxThree different methods of teaching English are used on three group of (1).docx
Three different methods of teaching English are used on three group of (1).docxJamesZ96Nashl
 
This week- we discuss Spotted Fevers and Typhus (Rickettsia) What are.docx
This week- we discuss Spotted Fevers and Typhus (Rickettsia)  What are.docxThis week- we discuss Spotted Fevers and Typhus (Rickettsia)  What are.docx
This week- we discuss Spotted Fevers and Typhus (Rickettsia) What are.docxJamesZ96Nashl
 

More from JamesZ96Nashl (20)

Use induction to show that n!-2n for all integers n4-.docx
Use induction to show that n!-2n for all integers n4-.docxUse induction to show that n!-2n for all integers n4-.docx
Use induction to show that n!-2n for all integers n4-.docx
 
Use Figure 2a to answer questions 69- Assume Stars A and B are the sam.docx
Use Figure 2a to answer questions 69- Assume Stars A and B are the sam.docxUse Figure 2a to answer questions 69- Assume Stars A and B are the sam.docx
Use Figure 2a to answer questions 69- Assume Stars A and B are the sam.docx
 
Use appropriate SFR and a Modifier to configure bits 2 and 12 of port.docx
Use appropriate SFR and a Modifier to configure bits 2 and 12 of port.docxUse appropriate SFR and a Modifier to configure bits 2 and 12 of port.docx
Use appropriate SFR and a Modifier to configure bits 2 and 12 of port.docx
 
urrent Attempt in Progress Companies that use GAAP do not have any gui.docx
urrent Attempt in Progress Companies that use GAAP do not have any gui.docxurrent Attempt in Progress Companies that use GAAP do not have any gui.docx
urrent Attempt in Progress Companies that use GAAP do not have any gui.docx
 
Unix a- Use a pipe and the grep command to show only the files in the.docx
Unix a- Use a pipe and the grep command to show only the files in the.docxUnix a- Use a pipe and the grep command to show only the files in the.docx
Unix a- Use a pipe and the grep command to show only the files in the.docx
 
Unilever's branding of Dove (with Dove Facewash- Dove Bodywash- Dove e.docx
Unilever's branding of Dove (with Dove Facewash- Dove Bodywash- Dove e.docxUnilever's branding of Dove (with Dove Facewash- Dove Bodywash- Dove e.docx
Unilever's branding of Dove (with Dove Facewash- Dove Bodywash- Dove e.docx
 
uestion 2 Audrey woked a part time iot during colege to help pay lor v.docx
uestion 2 Audrey woked a part time iot during colege to help pay lor v.docxuestion 2 Audrey woked a part time iot during colege to help pay lor v.docx
uestion 2 Audrey woked a part time iot during colege to help pay lor v.docx
 
Types of Audit Evidence Auditors must gather a combination of many typ.docx
Types of Audit Evidence Auditors must gather a combination of many typ.docxTypes of Audit Evidence Auditors must gather a combination of many typ.docx
Types of Audit Evidence Auditors must gather a combination of many typ.docx
 
Type of disability which is AUTISM SPECTRUM DISORDER (ASD) and describ.docx
Type of disability which is AUTISM SPECTRUM DISORDER (ASD) and describ.docxType of disability which is AUTISM SPECTRUM DISORDER (ASD) and describ.docx
Type of disability which is AUTISM SPECTRUM DISORDER (ASD) and describ.docx
 
Tutorial Questions- Week 3 1- Explain what is meant by the term organi.docx
Tutorial Questions- Week 3 1- Explain what is meant by the term organi.docxTutorial Questions- Week 3 1- Explain what is meant by the term organi.docx
Tutorial Questions- Week 3 1- Explain what is meant by the term organi.docx
 
True or False- Based on the shapes of the graphs below- there is varia.docx
True or False- Based on the shapes of the graphs below- there is varia.docxTrue or False- Based on the shapes of the graphs below- there is varia.docx
True or False- Based on the shapes of the graphs below- there is varia.docx
 
To which of the following investments MUST equity accounting be applie.docx
To which of the following investments MUST equity accounting be applie.docxTo which of the following investments MUST equity accounting be applie.docx
To which of the following investments MUST equity accounting be applie.docx
 
True of False- all SCIS are created equally- Question 11 options- Ques.docx
True of False- all SCIS are created equally- Question 11 options- Ques.docxTrue of False- all SCIS are created equally- Question 11 options- Ques.docx
True of False- all SCIS are created equally- Question 11 options- Ques.docx
 
Time reversal- Let (Bt-t0) be a Brownian motion- Show that the process.docx
Time reversal- Let (Bt-t0) be a Brownian motion- Show that the process.docxTime reversal- Let (Bt-t0) be a Brownian motion- Show that the process.docx
Time reversal- Let (Bt-t0) be a Brownian motion- Show that the process.docx
 
Transitioning to land included what modifications to gills- Enlarging.docx
Transitioning to land included what modifications to gills- Enlarging.docxTransitioning to land included what modifications to gills- Enlarging.docx
Transitioning to land included what modifications to gills- Enlarging.docx
 
Three fair dice are rolled- Let the random variable X represent the su.docx
Three fair dice are rolled- Let the random variable X represent the su.docxThree fair dice are rolled- Let the random variable X represent the su.docx
Three fair dice are rolled- Let the random variable X represent the su.docx
 
Tnix Company's ledger on July 31- its fiscal year-end- includes the fo.docx
Tnix Company's ledger on July 31- its fiscal year-end- includes the fo.docxTnix Company's ledger on July 31- its fiscal year-end- includes the fo.docx
Tnix Company's ledger on July 31- its fiscal year-end- includes the fo.docx
 
This week- share with us important or interesting art where you live--.docx
This week- share with us important or interesting art where you live--.docxThis week- share with us important or interesting art where you live--.docx
This week- share with us important or interesting art where you live--.docx
 
Three different methods of teaching English are used on three group of (1).docx
Three different methods of teaching English are used on three group of (1).docxThree different methods of teaching English are used on three group of (1).docx
Three different methods of teaching English are used on three group of (1).docx
 
This week- we discuss Spotted Fevers and Typhus (Rickettsia) What are.docx
This week- we discuss Spotted Fevers and Typhus (Rickettsia)  What are.docxThis week- we discuss Spotted Fevers and Typhus (Rickettsia)  What are.docx
This week- we discuss Spotted Fevers and Typhus (Rickettsia) What are.docx
 

Recently uploaded

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 

Recently uploaded (20)

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 

Use Python Write a program that firstly creates a list and initializes.docx

  • 1. Use Python Write a program that firstly creates a list and initializes it with the following numbers: 1, 2, 3, 4, 5, 6 Then, use a for loop to iterate over each element by their index numbers , and raise each element to the power of 2 (modify each element's value to its square). Finally, print out the modified list. The original list is [ 1 , 2 , 3 , 4 , 5 , 6 ] The modified list is [ 1 , 4 , 9 , 16 , 25 , 36 ]