1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vaselesa [24]
3 years ago
11

(Display nonduplicate words in ascending order)

Computers and Technology
1 answer:
olya-2409 [2.1K]3 years ago
5 0

Answer:

The program to this question as follows:

Program:  

value = input("Input text value: ") #defining variable value and input value by user

word = value.split() #defining variable word that split value

sort_word = sorted(word) #defining variable using sorted function

unique_word = [] #defining list

for word in sort_word: #loop for matching same value

   if word not in unique_word: #checking value

       unique_word.append(word) #arrange value using append function

print(' '.join(unique_word)) #print value

Output:

Input text value: Good morning Good afternoon Good evening

Good afternoon evening morning  

Explanation:

In the above python code, a value variable is defined that uses input function to input value from the user end, and the word variable is declared, which uses the split method, which split all string values and defines the sort_word method that sorted value in ascending order.

  • Then an empty list "unique_word" is defined, which uses the for loop and inside the loop, a conditional statement is used.
  • In if block, it matches all value is unique if this is condition is true it will arrange all values and uses the print function to print all value.  

You might be interested in
Your mother is sure that you were driving too fast because she knows
Klio2033 [76]

I think the corret answer would be C

5 0
3 years ago
Read 2 more answers
Suppose you wish to develop a matrix-multiplication algorithm that is asymptotically faster than Strassen’s algorithm. Your algo
Kazeer [188]

Answer:

The number of subproblems are given as T(n)=a*T(n/8)+\theta(n^2) while the value of T(n) to be less than S(n) is for 342.

Explanation:

The number of subproblems are given as

T(n)=a*T(n/8)+\theta(n^2)

Asymptotic running time for Strassen’s algorithm is S(n)=\theta(n^{log(7)})

Now, when a increases, number of subproblems determines the asymptotic running time of the problem and case 1 of master theorem applies. So, in worst case, asymptotic running time of the algorithm will be

T(n)=\theta(n^{logb(a)})=\theta(n^{log8(a)})=\theta(n^{log_{2}(a^{1/3})})

Now, for T(n) to be smaller than S(n)

n^{loga^{1/3}}

So,

log(a^{(1/3)})

So,

a=342

5 0
3 years ago
The Apple ll is an IBM compatible PC “clone.”<br><br> True <br><br> False
aliya0001 [1]

Answer is: False


<u>Explanation:</u>

IBM PC compatible computers are computers similar to the original IBM PC, XT, and AT, able to use the same software and expansion cards. Such computers used to be referred to as PC clones, or IBM clones.

<u>PC clone:</u>

In computer programming, particularly object-oriented programming, cloning refers to object copying by a method or copy factory function, often called clone or copy , as opposed to by a copy constructor.

7 0
4 years ago
Create a stack with three integers and then use .toarray to copy it to an array.
Marizza181 [45]

Answer:

import java.util.*;

import java.lang.*;

import java.io.*;

class Codechef

{

public static void main (String[] args)

{

    Stack<Integer> mat=new Stack<Integer>();

    mat.add(1);

    mat.add(3);

    mat.add(6);

    System.out.println(mat);

    Object [] a=mat.toArray();

    for(int i=0;i<a.length;i++)

    System.out.println(a[i]);

}

}

Explanation:

An integer type stack st is created;

1,3 and 6 are added to the stack.

printing the contents of the stack.

array a is created form the stack using toArray().

Then printing the array.

6 0
3 years ago
Consider an improved version of the Vigen ere cipher, where instead of using multiple shift ciphers, multiple mono-alphabetic su
anzhelika [568]

Answer:

Kasiski’s method for determining 't' works for Vigenère cipher as well. The only difference is therefore in the second stage of the attack. In the second stage, one needs to build a frequency table for each of the 't' keys, and carry out an attack like on the mono-alphabetic cipher. Given a long enough plaintext, this will work successfully.

Explanation:

Kasiski method is a method of attacking polyalphabetic substitution ciphers such as Vigenère cipher. It is also called Kasiski test or Kasiski examination.

The method involve finding the length of the keyword and then dividing the message into that many simple substitution cryptograms. Frequency analysis could then be used to solve the resulting simple substitution.

6 0
3 years ago
Other questions:
  • What is the relationship between ionic bonds and cleavage
    13·1 answer
  • Write a method reverse( ) for OurLinkedList class. The method should return a new OurLinkedList object that is the reverse of th
    8·1 answer
  • The acceleration of a body is 3 metre per second square what does it mean​
    11·2 answers
  • You realize your computer has been infected with malware. It seems as if someone is controlling your computer from a remote loca
    5·1 answer
  • What are some (free) good animation websites (for PC/Microsoft) for a short informational video about homelessness?
    15·1 answer
  • What do you mean by data sequencing​
    13·1 answer
  • What is peopleware?<br>need help​
    14·1 answer
  • The advantage of using a spreadsheet is:
    14·1 answer
  • Often, a single source does not contain the data needed to draw a conclusion. It may be necessary to combine data from a variety
    9·1 answer
  • Which one of these are a valid IPv4 address?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!