Questions
Can you please check for the error in my code?: #data object is created text_data =...

Can you please check for the error in my code?:

#data object is created
text_data = {"the_final_output": [{"abs": ""}, {"abs": ""}, ..., {"abs": ""}]}

#a list is created
main_terms = []
#iterating every data in the_final_output
for i in range(len(text_data["the_final_output"]):
blob = TextBlob(text_data["the_final_output"][i]["abs"])
main_terms.append(blob.polarity)
  
#sentiment analysis sorts the text into positive, neutral, and negative.
tp = sum(main_terms)
#if tp is less than 0, it's negative
if tp < 0:
print("Negative")
#if tp is greater than 0, it's positive
elif tp > 0:
print("Positive")
#if neither positive nor negative, it's neutral
else:
print("Neutral")

In: Computer Science

Research two computer programming languages (python can be one of them) and explain what tasks the...

  • Research two computer programming languages (python can be one of them) and explain what tasks the languages are best suited for and the industry in which they are typically used. Include a code snippet.
  • How has mobile computing changed your life? Describe the impact of mobile computing on programming. What are some commonly used mobile programming languages?
  • How will computer information systems fit into your professional life?

In: Computer Science

Write a program that uses nested for loops to print a multiplication table. Your program should...

Write a program that uses nested for loops to print a multiplication table. Your program should print out the multiplication table starting a 1 and going to 12. Output should be like:

1 x 1 =

.1 x 2 = 2

In: Computer Science

anwer in kotlin fun main() { val text = "Kotlin".getFirstAndLast() val firstChar = text["first"] val lastChar...

anwer in kotlin

fun main() {
val text = "Kotlin".getFirstAndLast()

val firstChar = text["first"]
val lastChar = text["last"]

// TODO 2
println()

}

// TODO 1
fun String.getFirstAndLast() = mapOf<String, Char>()

TODO 1:
Make the getFirstAndLast function the extension of the String class with the return type Map <String, Char>

TODO 2:
Add functions to print the values of the firstChar and lastChar variables in the console.

there no more information from this task

i dont know.
this is the full task

In: Computer Science

on python 3.6: Write a program that will quickly estimate pi to a precision of 1e-4...

on python 3.6:

Write a program that will quickly estimate pi to a precision of 1e-4 using Archimedes approach of averaging polygon perimeters. Your program should employ a loop where the number of sides of the polygon are increased each iteration until the absolute value of the difference between the current estimate and the previous estimate is less than 1e-4. l. The program should output the estimate of pi and the number of iterations needed to reach the desired level of precision.

the code for the finding pi using the Archimedes approach is:

numside_ins=float(input(enter the number of sides of the inscribed polygon))

numside_cis=float(input(enter the number of sides of the circumscribed polygon))

diameter= 1
length_ins= 2*(diameter/2)*sin(pi/numside_ins)
peri_ins= numside_ins*length_ins
length_cir= 2*(diameter/2)*tan(pi/numside_cir)
peri_cir = numside_cir * length_cir
ave_peri=((peri_cir + peri_ins) / 2)
found_pi= ave_peri/diameter
print(found_pi)

In: Computer Science

1. Find the propagation delay for a signal traversing the following networks at the speed of...

1. Find the propagation delay for a signal traversing the following networks at the speed of light in cable (2.3 × 108 meter/second).

(a) metropolitan area, 100 km

(b) continent, 5000 km

2. How many (i.e. maximum) bits are in transit during the/a propagation delay (assuming the pipe is full) in the case (a) of Question 1 if bits are entering the network at the following transmission speeds:

(a) 1 Megabits/second

(b) 100 Megabits/second

(c) 10 Gigabits/second

3. In the case (b) of Question 1 and Question 2, how long does it take to send an L-bit file in the following cases:

(a) L = 10^3

(b) L = 10^6

(c) L = 10^9

In: Computer Science

Define a class Fraction3YourName as follows, /** * Program Name: Fraction3YourName.java * Discussion: Fraction3Yourname class *...

Define a class Fraction3YourName as follows,

/**
* Program Name: Fraction3YourName.java
* Discussion: Fraction3Yourname class
* written By:
* Date: 2019/09/19
*/
public class Fraction3YourName {
private int sign;
private int num;
private int denom;
public Fraction3YourName() {
//sign = ;
//denom = ;
}
public Fraction3YourName(int n) {
//sign = ;
//num = n;
//denom = ;
}
public Fraction3YourName(int s, int n, int d) {
//sign = s;
//num = n;
//denom = d;
}
}

by java programming

In: Computer Science

Explain about security that can be provided in these three layers: Application layer, TCP/IP layer, network...

Explain about security that can be provided in these three layers: Application layer, TCP/IP layer, network layer.

In: Computer Science

Try to make it as simple as you can and explain as much as it needed....

Try to make it as simple as you can and explain as much as it needed.

  1. What are the differences between symmetric encryption and asymmetric encryption? (1 point)

Ans:

  1. What is pseudo random numbers? (1 point)

Ans:

  1. What is Moore’s Law? (1 point)

Ans:

  1. What are four different block cipher modes? (1 point)

Ans:

  1. What is one-time pad? (1 point)

Ans:

In: Computer Science

This is a java coding String manipulation Question. Let us say I have a String which...

This is a java coding String manipulation Question.

Let us say I have a String which looks something likes this:

String x = "MATH,PHYSICS,CHEMISTRY,CODING"

And then I have another String which looks something like this:

String y = "XXXXMXXXAXXXTXXXXHXXXXXXCXXXXOXXXXDXXXIXXXXNXXXGXXXX"

and another String that looks like this:

String z = "XXXXHXXTXXXXAXXMXXXXXCXXXOXXXDXXXIXXXNXXXG"

I want to take String y and print the words that are found in String x as such:

Math

Coding

and for String z if I want to take it and print the words also found in x as such:

Math

Coding

So basically I want to the program to print the possible words from the letters I have in String y and z.

and only print possible words from my String x.

I want to know how I can do such thing please explain so that I understand what is going on. I have tried replacing the Xs with nothing and then I would have the letters and then I'll use it to check if it has something in String x. but that made me use arrays and also if I replaced Xs with nothing and I had to words in Z or Y then I'll end up with something I can not work with only letters.

I have also thought about making a char array from the resulting String after replacing Xs. and then split String x by ',' and after make a char array of each word and then check if the char array of each word contains the chars of the resulting String after replacing Xs with nothing.

but that also does not work.

I think this is a simple problem that I am over complicating.

Please help and thank you.

In: Computer Science

Explain any android application in detail and on your own words it should include the purpose,...

Explain any android application in detail and on your own words

it should include the purpose, security features and you suggest to improve it

In: Computer Science

Given that Sale[NUM_ROW][NUM_COLUMN] is a two dimensional array of float- point type and the two constants...

Given that Sale[NUM_ROW][NUM_COLUMN] is a two dimensional array of float-

point type and the two constants are defined as follows:

#define NUM_ROW 4

#define NUM_COLUMN 4

float Value[NUM_ROW][NUM_COLUMN] =

{

2.1, 2.2, 2.3, 2.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.1, 2.2, 2.3, 2.4

};

Write a C++ main function that computes and prints out the following information about

this 2d array:

(1) The mean of all the Value[][] array elements (0.5 points).

(2) The median of all the Value[][] array elements (0.5 points)

(3) The local average values of all the array elements (1.0 points). For instance, the

local average value at position i, j = (Value[i-1][j]+Value[i+1][j]+Value[i][j+1]+Value[i][j-1]+Value[i][j])/5.

If (i+1) > NUM_ROW-1 or (i-1) < 0, use modulus operator to wrap around to the other end of the array index.

Create another array: Average[NUM_ROW][NUM_COLUMN], and use this array to store the values

of local average at each position of this 2d array. At the end, you need print out

the values of all the array elements of Average[][] on computer screen.

Parts (2) only please.

In: Computer Science

Create a website for an online movie rental store, using HTML (and any other client technologies)...

Create a website for an online movie rental store, using HTML (and any other client technologies) and PHP. The website should include:

- A front/home page containing a list of movies available for rent (list at least 10 movies).

o Each movie should have a listed rental price.

o Additional information provided:

§ name of actors in the movie (list at least 2)

- The home page should link to a form for renting a movie

o Selecting and submitting a movie for rent will lead to a page displaying

§ the name of the movie rented,

§ the amount charged (calculated with 5% tax),

§ the date and time rented, and § the date and time the movie is due for return (in 5 days).

- A form linked through the home page for selecting a movie and submitting a user review.

o Input fields should include

§ The name of the movie

§ Username

§ Rating in 5 stars

§ User review

o Output after submitting a review should show the name of the movie and all submitted information.

In: Computer Science

Try to make it as simple as you can and explain as much as it needed....

Try to make it as simple as you can and explain as much as it needed.

  1. What are the differences between symmetric encryption and asymmetric encryption? (1 point)

Ans:

  1. What is pseudo random numbers? (1 point)

Ans:

  1. What is Moore’s Law? (1 point)

Ans:

  1. What are four different block cipher modes? (1 point)

Ans:

  1. What is one-time pad? (1 point)

Ans:

In: Computer Science

Try to make it as simple as you can and explain as much as it needed....

Try to make it as simple as you can and explain as much as it needed.

  1. Define Integrity and Nonrepudiation? (2 points)

Ans:

  1. What are the differences between Stream Cipher and Block Cipher? (2 points)

Ans:

  1. What is Access Control and why is it important? (2 points)

Ans:

  1. Message Authentication Code ensures authentication or integrity or both? Justify and explain your answer. (3 points)

Ans:

  1. What are the weaknesses of DES? Why triple DES is better than Double DES? (3 points)

Ans:

In: Computer Science