Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a python program to create a regular expression to retrieve all words starting with vowels in each string.


convert ten digits into a string:



rules for conversion:



separate the number into a set of four-three-three


Two consecutive numbers: double


Three consecutive numbers: triple


Four consecutive numbers: quadruple



sample input:9966777819



output should be:double nine double six triple seven eight one nine



Sample input2: 9999



Output should be: quadruple nine



Sample input3: 88



Output should be: double eight

Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source.



Nested lists


The “*” operator


List slices


The “+=” operator


A list filter


A list operation that is legal but does the "wrong" thing, not what the programmer expects


Provide the Python code and output for your program and all your examples


Construct a class named “Book” that assigns title, author and format as initial values.


Create a class named “Library” that extends “Book” and assigns available as initial value, a method named updateAvailability that updates availability of the book, and a method named “str” that returns the string representation of the class.

Write an “abstract” class, Box, and use it to define some methods which any box object should have: add, for adding any number of items to the box, empty, for taking all the items out of the box and returning them as a list, and count, for counting the items which are currently in the box. Write a simple Item class which has a name attribute and a value attribute – you can assume that all the items you will use will be Item objects. Now write two subclasses of Box which use different underlying collections to store items: ListBox should use a list, and DictBox should use a dict.


Write an algorithm to find the total number of units of memory allocated deallocated by the server 1 after preprocessing all the requests

given a number of days(N) as input, write a programme to convert N to years(Y),weeks(W)and days(D)


if the input is :

4 4

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16


then output should be:- 1 2 3 4 8 7 6 5 9 10 11 12 16 15 14 13


Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source.



Nested lists


The “*” operator


List slices


The “+=” operator


A list filter


A list operation that is legal but does the "wrong" thing, not what the programmer expects


Provide the Python code and output for your program and all your examples.




Given a MxN matrix,write a program to print all Anti-Diagonals elements of matrix





Input





The first line of input will contain a M, N values separated by space.





The second line will contain matrix A of dimensions MxN.





Output





The output should contain anti-diagonal elements separated by a line.





Explanation





For example, if M = 2, N = 3





Matrix A:





1 5 5





2 7 8





Output:





1





5 2





5 7





8

LATEST TUTORIALS
APPROVED BY CLIENTS