Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

****************** PYTHON ********************** Link= https://docs.python.org/3/tutorial/datastructures.html >>> fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] >>> fruits.count('apple') In [ ]: >>> fruits.count('tangerine') In [ ]:

****************** PYTHON **********************

Link= https://docs.python.org/3/tutorial/datastructures.html

image text in transcribed

>>> fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] >>> fruits.count('apple') 

In [ ]:

>>> fruits.count('tangerine') 

In [ ]:

>>> fruits.index('banana') 

In [ ]:

>>> fruits.index('banana', 4) # Find next banana starting a position 4 

In [ ]:

>>> fruits.reverse() >>> fruits 

In [ ]:

>>> fruits.append('grape') >>> fruits 

In [ ]:

>>> fruits.sort() >>> fruits 

In [ ]:

>>> fruits.pop()
Do the following for this task: 1. Read through the following tutorial carefully: httos.docs.python.org3/tutorial/datastructures.html 2. While reading, transcribe every code example and make sure every statement works in your notebook. ENTER ALL CODE STARTING IN THE CELL BELOW YOU MUST USE ONE CELL FOR EACH CODE SNIPPED THAT RETURNS AN OUTPUT IN EACH EXERCISE THE FIRST EXERCISE HAS BEEN PASTED BELOW TO GET YOU STARTED In [ 1: >> truits'orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana'] In >>> fruits.count [ 'tangerine ') In>fruits.index( 'banaa In [ ]: >>> fruits. index('banana", 4) # Find next banana starting a position 4 In:>fruits.reverse i) In: >> fruita.append'grape) In fruits.sort In [ ?: >>> frusts.pop() fruits.countl 'apple s fruits 3s> truits fruits

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

10. Microsoft Corporation

Answered: 1 week ago

Question

4. EMC Corporation

Answered: 1 week ago