Decode permutation cipher python [closed] - python

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 days ago.
Improve this question
I need to write a program to decode a permutation cipher. Could you help me? Thanks.
The input of the procedure should include the initial phrase and the number of periods. There is an encryption key and it has to be converted to reverse. Use strings please.

Related

What is Brute Force approach in python? With an example please? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 days ago.
Improve this question
I am trying to understand what is Brute Force approach in Python?
I have a Lennard-Jones potential equation and my interatomic distance value is unknown, so my professor told me to use the Brute Force approach.
I don't know how to do so, can you explain it to me with a little simple code example?
Thank you

How to find the shape on a string python [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 days ago.
Improve this question
for example I have a string of
001100
010010
010010
001100
the shape of the 1's is the number zero
all I need to do is to get how many zero's there are in the string

How to search for the smallest value in a 4-digit number by using while loop? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
For example, "1234" and I want the program knows that 1 is the smallest value. Thank you
This may be of help.
x = min('1234')

add index of values in between elements in a string [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
For example:
input: "Orange"
output: "O0r1a2n3g4e5"
I know I will have to convert the string to a list so I can iterate and append the index numbers, but I don't know how to do that in code.
''.join([f'{letter}{index}' for index, letter in enumerate(input)])

Identify negative sentence By using NLP [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to check below sentence is either positive or negative please help me
Sentence -I don't remember anything
Is this what you are looking for? (In Python)
from textblob import TextBlob
TextBlob("not a very great calculation").sentiment
## Sentiment(polarity=-0.3076923076923077, subjectivity=0.5769230769230769)

Categories

Resources