Starting from:

$35

Homework 01 METU CENG310


Homework 01
METU CENG310 
Data Structures and Algorithms with Python

1 Reading
Task-1: Read Chapter-2 from the textbook.
Task-2: Read reference pages for collections and array modules.
https://docs.python.org/3/library/collections.html
https://docs.python.org/3/library/array.html
Task-3: Overview reference pages for copy, heapq, math, os, random, re, sys, and time modules.
2 Coding
Task-4: Write a function that takes a string object as parameter and returns the reversed version of the string.
For this task, you should use only the built-in data types and functions.
Task-5: Textbook Exercises R-1.2, R-1.6, R-1.7, R-1.9, R-1.11, C-1.19, C-1.20, and C-1.28
Task-6: Textbook Exercise P-1.35
Task-7: What does the code snippet below do?
1 while len( l1 ) != 0:
2 l2 . insert ( len( l2 ) , l1 . pop (0) )
3 The Deliverable
For the reading section, no response is required, however, be aware that without completing the reading
assignments, following the upcoming lectures might be overwhelming on your side.
For coding tasks, your deliverable should be a Python module named as hw1.py that includes all the code that
you will develop as responses to the tasks. Please mark your code snippets with meaningful comments (e.g.,
# Answer for R-1.2) separately for each answer.
Needless to say, these homework assignments are meant to improve your understanding the lecture material
by means of hands-on application. They have to be your own work. Due to that reason, no answers acquired
from online or offline resources will be accepted and may be subject to further administrative actions.
4 Instructions
A Homework-01 Submission page will be generated soon after the start date of this homework. All deliveries
should be done over METUClass. Please also be aware of the late penalties (Please check the Announcements
– Homework and Assignment Policy in METUClass if you have not already done so.). Should you have any
questions pertaining to homework tasks, please ask them to our TA in advance (not on the due date) for your
own convenience. The free late days will not automatically be applied unless you deliberately state otherwise.
If you want to use free late days, please inform TA in three days following the due date.
1

More products