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

Lucky Pairs

Two numbers are said to be lucky pairs . if first number is divided by second number and second number is divided by first number. given an integer N . find all possible combinations of lucky pairs.



input:

2


output:

2


Explanation:

input is 2

possible combinations are [1,2],[2,1].here in [1,2]1 is divisible by 2, and in [2,1] 2 is divisible by 1 .so the number of lucky pairs are 2.



Project 5: Social Media account

Implement a program that manages the data of the social media account. The user can access only his/her own account. The account is characterized by username, password, name, sumame, birth date and list of friends (characterised by the account username). The data are stored into a json file. The application should manage the following characteristics:

Sign up: register to the system

Sign in: by providing usename and password and showing all the user data

Search for a user (using name and surname)

Add a used to the friend list

Changes need to be stored back in the file. The above functionalities are implemented through methods of a class named SocialMedia. The application interacts with the user through a menu where the user is asked for the next action to undertake (e.g., 1-Sign Up, 2

Sign In, etc.) Put comments in your code.


Project 4: Music Store

Implement a program that manages the data of a music store. The store manages the list of CDs that can be bought. For each CD, the store has the following data: album title, singer/band name, recording house, published year, music genre, and a list of song titles.

The data are stored into a json file. The application should manage the following characteristics:

Add a new CD

Remove existing CD

Show all CDs of a given singer/band .    Show all CDs containing a specific song (identified by song title)

Changes need to be stored back in the file. The above functionalities are implemented through methods of a class named TravelAgency. The application interacts with the user through a menu where the user is asked for the next action to undertake (e.g., 1-Add new CD, 2-Remove existing CD, etc.) Put comments in your code.


Project 3: Amazon book store

Implement a program that manages the order process of Amazon for customers willing to buy books. Amazon has a list of books that can be purchased online. Each book is described: title, publishing house, and a list of authors (there might be more than one author if it is an academic book) and a price. The user can select the book/s he/she wishes to buy and then purchase them. The data are stored into a json file. The application should manage the following characteristics: search for a book by title name search for a book by author name (remember that the book might have more than one author) add a book to the chart calculate the total cost

For the chart feel free to use a dedicated file. The above functionalities are implemented through methods of a class named Amazon. The application interacts with the user through a menu where the user is asked for the next action to undertake (e.g., 1 Search book, 2-

Add book to chart, etc.) Put coments in your code.


Project 2: Travel Agency

Implement a program that manages the data of a travel agency. The agency manages the list of hotels that accommodate tourists. For each hotel the agency has the following data: name, address, city, country, number of starts, price per night and a list of facilities. The data are stored into a json file. The application should manage the following characteristics: add a new hotel , remove existing hotel (identified by name) , show hotels of a specific city or country, show hotels that provide a specific facility (e.g., free wifi)

Changes need to be stored back in the file. The above functionalities are implemented through methods of a class named TravelAgency. The application interacts with the user through a menu where the user is asked for the next action to undertake (e.g., 1 -Add new hotel, 2- Remove existing hotel, etc.) Put comments on your code.


Project 1: Phonebook

Implement a program that manages a smartphone phonebook. Each contact might have the following data: name, surname, birthday and a set of Phone Numbers (to the same contact we may assign several phone numbers). The data are stored into a json file. The application should manage the following characteristics: create and add new contact the book ,remove existing contact (contacts are identified by name) , show all the contact , show the list of persons among your contact the has the birthdate

Changes need to be stored back in the file. The above functionalities are implemented through methods of a class named PhoneBook. The application interacts with the user through a menu where the user is asked for the next action to undertake (e.g., 1-Add new contact, 2- Remove Existing contact, etc.) Put comments in your code


How do I implement minimum heap on date and time, e.g. 23/7/2021 23:45, 24/5/2021 22:10, 20/5/2021 20:00. To implement minimum heap on the example.


In this Python code they were not getting expected output


M, N = input().split()
M, N = int(M), int(N)

matrix = []
for _ in range(M):
	row = [int(x) for x in input().split()]
	matrix.append(row)

K = int(input())

values = matrix[0][:-1] + [x[-1] for x in matrix][:-1] + matrix[-1][::-1][:-1] + [x[0] for x in matrix][::-1][:-1]

values = values[-K:] + values[:-K]

output = matrix

idxs = [(0, j) for j in range(N)][:-1] + [(i, N - 1) for i in range(M)][:-1] + [(M - 1, j) for j in range(N)][::-1][:-1] + [(i, 0) for i in range(M)][::-1][:-1]

idx = 0
for i, j in idxs:
	output[i][j] = values[idx]
	idx += 1

for i in output:
    for j in i:
      print(j, end=' ')
    print()

The test cases and outputs are in below url link

https://drive.google.com/file/d/1bi2pXd22sg9CeCnQp6SUzGOAsVpPguLi/view?usp=sharing


We need all test cases can be came when code was run. I want exact outputs for all test cases

We run the "Word mix" code , The output will be like this


The nth word in the output should contain nth letter of each word in the given sentence. The letters of the output word should be in same order as the words in the given sentence. If a word in the given sentence doesn't have n-letters, you can skip it while considering the letters of the n-th word.


Ex: Input :: Welcome to your first problem


Output :: Wtyfp eooir luro crsb otl me em


But,run the above code displayed only "Wtyfp" .


Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'.


Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters.


abcdefghij12345678910

klmnopqr1112131415161718

stuvwxyz1920212223242526



LATEST TUTORIALS
APPROVED BY CLIENTS