100% Guaranteed Results


Python – Assignment (Lecture-5) Solved
$ 20.99

Description

5/5 – (1 vote)

1. Write a generator function to iterate over first `n` fibonacci numbers.

2. Consider a list of the form:
“`
[
(x1, y1, z1),
(x2, y2, z2),
(x3, y3, z3),
.
.
.
(xn, yn, zn)
]
“`
Transform it to following form:
“`
[
(x1, x2, x3, …., xn),
(y1, y2, y3, …., yn),
(z1, z2, z3, …., zn)
]
“`

3. Write a Python program to count the frequency of words in a file.

4. Write a program which takes a text file as input and does following operations sequentially over it:
– Create a list of words present in file
– Convert all words to uppercase (using map)
– Remove the words from list which contain ‘a’ (using filter)
– Generate a string by concatenating all the words in the final list
(using reduce)

5. Write a Python program to print all the Sundays of a specified year.

6. Write a Python class to get all possible unique subsets from a set of distinct integers.
“`
Input : [4, 5, 6]
Output : [[], [6], [5], [5, 6], [4], [4, 6], [4, 5], [4, 5, 6]]
“`

7. Try to solve **all** the hackerrank questions given in previous assignments.

Referenes:
– [Intermediate
Python](https://www.youtube.com/playlist?list=PLyb_C2HpOQSDJnnaz7vA8s5ssW7Ljc WuH)
– [datetime string format specifiers](http://strftime.org/)

Reviews

There are no reviews yet.

Be the first to review “Python – Assignment (Lecture-5) Solved”

Your email address will not be published. Required fields are marked *

Related products