Answer:
import numpy as np
word = input("Enter a word: ")
acc = []
with open("Downloads/record-collection.txt", "r") as file:
lines = file.readlines()
for line in lines:
if word in line:
line = line.strip()
acc.append(int(line[0]))
if np.mean(acc) >= 2:
print(f"The word {word} is a positive word")
print(f"{word} appeared {len(acc)} times")
print(f"the review of the word {word} is {round(np.mean(acc), 2)}")
else:
print(f"the word {word} is a negative word with review\
{round(np.mean(acc), 2)}")
Explanation:
The python program gets the text from the review file, using the user input word to get the definition of reviews based on the word, whether positive or negative.
The program uses the 'with' keyword to open the file and created the acc variable to hold the reviews gotten. The mean of the acc is calculated with the numpy mean method and if the mean is equal to or greater than 2 it is a positive word, else negative.
Answer:
Your CSS files are smaller and simpler.
Explanation:
External stylesheet are used in HTML pages to keep the HTML content and its styling separate. When using external stylesheet all the style rules are defined in CSS files and HTML files only contain the HTML code.
By using external style sheet,
- One can make HTML code smaller and simpler.
- One can use the same stylesheet in multiple HTML pages and thus provide styling to multiple pages.
- With external stylesheet one can alter the single stylesheet code and its effect can be seen on all pages which are using that stylesheet.
Using external stylesheet has no effect on the content of CSS files. The CSS files will contain the same CSS style rules that are defined for any HTML page within the page.
Thus using external stylesheet doesn't make CSS files smaller and simpler.
There are several---guerrillamail, sharklasers and other--- providers that can send anonymous mail. If she named herself in the message, she may be able to let her boss know (where the colleague likely wouldn't dare to look) about the delay.
Answer:
see explaination
Explanation:
public class Counter
{ int counter,limit;
static int nCounters = 0;
Counter(int a,int b)
{ counter=a; limit=b;
nCounters++;
}
void increment()
{ if(counter<limit)
counter++;
}
void decrement()
{ if(counter>0)
counter--;
}
private int getValue()
{ return counter;
}
private static int getNCounters()
{ return nCounters;
}
}