You are on page 1of 1

Class XII

Computer Science
1. Assignment Number-12 (Full marks 20)

SEND your work as a PDF file ONLY


The first line of BOTH the codes will have your Name, Class, Section,
Session as COMMENT Lines. Take PROPER screen shot of each CODE
and its OUTPUT and paste it in a Word file. CROP the image to show
only the code part [right click on the image to get the crop tool → ].
Convert Word file to PDF and send PDF file. Ensure the file is readable

1. Create a text file in Python to store the data for n


number of shapes as a CSV file shapes.txt. Each
line of the file will have the following data
separated by commas (as shown in the text file on
the right). Store a MINIMUM of 8 shape data:
• The name of a shape (like circle, rectangle,
square, triangle etc.)
• The number of sides in that shape
• The colour of that shape (10)
2. Open the above file in read mode and read the file content one line at a time.
Next print the names of those shapes which are having number of sides more
than 4 and having a colour value of red. (10)

2. Note:
• You are requested to submit neat work
• Those who submit pdf must ensure that an assignment is a single pdf and
pages are not submitted as separate pdfs
• Adoption of unfair means will be dealt with firmly. Photos of text book
pages or study material from other sources must not be submitted
• Blurred images or low light pictures will not be corrected
• This assignment may be a part of Term 2 assessment
• For evaluation of the assignments, pupils are requested to complete their
work and submit their responses through SKOLARO only

3. Date of Assignment Upload and Submission:


Date of Upload: 12/10/2020
Due Date of Submission: 22/10/2020

You might also like