Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the give example below is data structure union example. want to use python, doing a list data structure. Exercise 2.3 a) Look up the definition

the give example below is data structure union example. want to use python, doing a list data structure.

image text in transcribed

Exercise 2.3 a) Look up the definition of the list data structure in Python. Give two examples of lists in Python. [4 points] b) Similar to what we did in class for the C Union data structure (also posted on the class web- site), write EBNF (or BNF) descriptions for a list data structure in Python. The level of detail could be similar to the Union example. It's fine to keep simple and just choose two data types that will be inside the list (example, integers or strings). Allow lists within lists. (hint: You do not need to show this, but to convince yourself that you are writing the EBNF prop- erly, the EBNF description should be able to generate examples such as the ones that you have in (a)) [3 points] EBNF Urion promple: Fwd_M pict Example code: wd_ pictur - Uniond int i; float t; char stre30] ng Union EBNF: >, ' Union { { ; } } cidentifier> = irt-I = char / Freal ... Litentific] =) 10 /","7 2 -... =7 CAB " c a . car151 Exercise 2.3 a) Look up the definition of the list data structure in Python. Give two examples of lists in Python. [4 points] b) Similar to what we did in class for the C Union data structure (also posted on the class web- site), write EBNF (or BNF) descriptions for a list data structure in Python. The level of detail could be similar to the Union example. It's fine to keep simple and just choose two data types that will be inside the list (example, integers or strings). Allow lists within lists. (hint: You do not need to show this, but to convince yourself that you are writing the EBNF prop- erly, the EBNF description should be able to generate examples such as the ones that you have in (a)) [3 points] EBNF Urion promple: Fwd_M pict Example code: wd_ pictur - Uniond int i; float t; char stre30] ng Union EBNF: >, ' Union { { ; } } cidentifier> = irt-I = char / Freal ... Litentific] =) 10 /","7 2 -... =7 CAB " c a . car151

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

Knowledge Discovery In Databases

Authors: Gregory Piatetsky-Shapiro, William Frawley

1st Edition

ISBN: 0262660709, 978-0262660709

More Books

Students also viewed these Databases questions

Question

What are the functions of top management?

Answered: 1 week ago

Question

Bring out the limitations of planning.

Answered: 1 week ago

Question

Why should a business be socially responsible?

Answered: 1 week ago

Question

Discuss the general principles of management given by Henri Fayol

Answered: 1 week ago