Question: SECTION B: Write and run Python code for the following examples using https://repl.it/languages/python3 online compiler.copy the code from the compiler and paste it in the

 SECTION B: Write and run Python code for the following examples

SECTION B: Write and run Python code for the following examples using https://repl.it/languages/python3 online compiler.copy the code from the compiler and paste it in the answer area, then take a screenshot of your work (code and output) and submit it. QUESTION ONE Define the list fruits as fruits = 1"apple". "banana". "cherry". "mango". Write Python program to answer the following questions: 1. Use the positive indexing method to print the second item in the list fruits. 2. Use the negative indexing method to print the last item in the list fruits. 3. Use the negative indexing method to print "BANANA" item from the list fruits. 4. Use the positive indexing method to print "A" from the list fruits. QUESTION TWO Write a Python program to create a variable X, and assign to it numbers from 0 to 20 using the range method 1. Print out all the variable X elements. 2. Print out the fifth element in variable X. 3. Print out 25 from the variable X 4. Print out -10 from the variable X. 5. Print out the second element in the variable X three times

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!