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 that takes balance of a user’s account as input. It should then ask the user how much amount he\she wants to withdraw from his\her account. The program should take this amount as input and deduct from the balance. Similarly, it should ask the user how much amount he\she wants to deposit in his\her account. It should take this amount as input and add to the balance. The program shall display the new balance after amount has been withdrawn and deposited.

Note: Your program should have all necessary checks on the transactions. Display a menu to the user to let him\her choose between different available options.


A company that wants to send data over the Internet has asked you to write a program in Python that will encrypt it so that it may be transmitted more securely. All the data is transmitted as four-digit integers. Your application should read a four-digit integer entered by the user and encrypt it as follows:

a)     Replace each digit with the result of adding 6 to the digit and getting the remainder after dividing the new value by 10.

b)    Then swap the first digit with the third and swap the second digit with the fourth. Then print the encrypted integer. Write a separate application (in Python) that inputs an encrypted four-digit integer and decrypts it (by reversing the encryption scheme) to form the original number.


Write a python program to achieve AES 128 bit key length encoding and decoding of text and it should be algorithm based rather than using any library function. 

Input text

“To be, or not to be, that is the question:

Whether 'tis nobler in the mind to suffer

The slings and arrows of outrageous fortune,

Or to take arms against a sea of troubles

And by opposing end them. To die—to sleep,

No more; and by a sleep to say we end

The heart-ache and the thousand natural shocks

That flesh is heir to: 'tis a consummation

Devoutly to be wish'd. To die, to sleep;

To sleep, perchance to dream—ay, there's the rub:

For in that sleep of death what dreams may come,

When we have shuffled off this mortal coil,

When he himself might his quietus make

With this regard their currents turn awry

And lose the name of action.”

Expected output:

O426pZT/JplIF8kyaiz3BDnCS5gfsMqAQS3P4ddM6ymaAlpSJBd8BNkZMJwux18ScbGM/HQn8RG its extended upto some length




I need help with an edhesive question and please dont put one of those "too hard to answer" things. Im trying to do a personal organizer in code but i have no idea what im doing so if you can help i would love that! the info is right here:

https://intro.edhesive.com/courses/55668/assignments/7530041?module_item_id=16590785

sample run:

What is the event: Math Exam

What is the month (number): 2

What is the date: 29

What is the year: 2017

Do you want to enter another event? NO to stop: Yes

What is the event: Birthday Party

What is the month (number): 6

What is the date: 31

What is the year: 2018

Do you want to enter another event? NO to stop: NO


******************** List of Events ********************

Math Exam

Date: February 1, 2017

Birthday Party

Date: June 1, 2018

create a program that should ask a user input either 0 (tails) or

1 (heads). Then the program will draw a coin flip. The program will declare the

user a winner if the result of the coin flip is equal to the user input. If the

user enters a value outside the given choices, it will display invalid choice.


For the given data frame DF shown above we want to get all the records with toef1 score greater than 105 but smaller than 115 which of the following expressions is incorrect to perform the same


Non-Adjacent Combinations of Two Words


Given a sentence as input, find all the unique combinations of two words and print the word combinations that are not adjacent in the original sentence in lexicographical order.


Input


The input will be a single line containing a sentence.


Output


The output should be multiple lines, each line containing a valid unique combination of two words. The words in each line should be lexicographical order and the lines as well should be in lexicographical order. A valid combination will not contain the words that appear adjacent in the given sentence. Print "No Combinations" if there are no valid combinations.



Sample Input 1

raju always plays cricket

Sample Output 1

always cricket

cricket raju

plays raju


Sample Input 2

python is a programming language


Sample Output 2

a language

a python

is language

is programming

language python

programming python


Sample Input 3

to be or not to be


Sample Output 3

be be

be not

or to

to to




Rotate Matrix Rings

Given a matrix of order M*N and a value K, write a program to rotate each ring of matrix clockwise by K elements. If in any ring has less than or equal to K elements, then don’t rotate that ring.


Input


The first line of input will be two space-separated integers denoting M and N.

The next M lines will contain N space-separated integers.

The next line will contain integer, denoting K.


Output


The output should be M*N matrix by rotating matrix by K elements.




For example, if given M and N are 4 and 4 respectively. If matrix elements are

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

If given K is 3. Rotate each ring of matrix by 3 elements.

In above matrix, the elements (1, 2, 3, 4, 8, 12, 16, 15, 14, 13, 9, 5) is a ring, similarly, the elements (6, 7, 11, 10) will make a ring.

Therefore, by rotating each ring in clockwise direction by 3 elements will give (13, 9, 5, 1, 2, 3, 4, 8, 12, 16, 15, 14) and (10, 6, 7, 11). So output should be

13 9 5 1

14 7 11 2

15 6 10 3

16 12 8 4


For this task, you are to write a Python code that asks the user to enter 2 or more integers as a string, to be entered on one line, separated by one zero. If there are more than one zero, then these will be a part of the number. The program then finds the even numbers, computes and prints out the average. See the below example:


num = input("Enter your number. ")

Assume the user entered "2040304405", then the summation of even numbers is 2+4+44=50, and the average is 50/3=16.6


INPUT


2040304405


200400604405


EXPECTED OUTPUT


2+4+44=50


50/3= 16.6


20+40+ 6+44=110


110/4=27.5


1.      >>> 2- 2


2.      >>> 2 -(2-)

 File "<stdin>", line 1

   2 -(2-)

         ^

SyntaxError: invalid syntax


3.      >>> (0+1)-9(1/2)

<stdin>:1: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?

Traceback (most recent call last):

 File "<stdin>", line 1, in <module>

TypeError: 'int' object is not callable

Give explanation to these results experimented in python.


LATEST TUTORIALS
APPROVED BY CLIENTS