Non-Volatile Random Access Memory
Answer:
See explaination for the code
Explanation:
def wordsOfFrequency(words, freq):
d = {}
res = []
for i in range(len(words)):
if(words[i].lower() in d):
d[words[i].lower()] = d[words[i].lower()] + 1
else:
d[words[i].lower()] = 1
for word in words:
if d[word.lower()]==freq:
res.append(word)
return res
Note:
First a dictionary is created to keep the count of the lowercase form of each word.
Then, using another for loop, each word count is matched with the freq, if it matches, the word is appended to the result list res.
Finally the res list is appended.
Answer:
Assembly language is also known as second generation language. We can also say it low level language. To implement assembly language on hardware it require a lot of knowledge of computer hardware.
Mostly assembly language is used in Kernel and hardware drives like RAM or ROM these hardware parts belong to second generation. So, assembly language require a lot of knowledge of hardware as well spare time also to write it to get desired output from the hardware.
Assembly language is also used in video editing and video games and require a lot of time.
I hope it will help you!
Answer:
While loop
Explanation:
It should be noted that the number of times which the computer will ask the user to take a guess is not known.
When we have a condition like this, the while loop (or in some programs; the do-while loop) is to be used.
To further back my point, see the following program in python.
<em>secret_code = 1234</em>
<em>user_guess = int(input("Take a guess: "))</em>
<em>while user_guess != secret_code:</em>
<em> user_guess = int(input("guess again: "))</em>
<em>print("You guessed right")</em>
<em />
The above program will keep asking the user to take a guess until the user enters 1234.
<em>This may or may not be possible with a for loop.</em>
Answer:
In C++:
#include<iostream>
using namespace std;
int main(){
int numDays;
cin>>numDays;
cout<<"Days: "<<numDays<<endl;
return 0;
}
Explanation:
This line declares numDays as integer
int numDays;
This line gets user input for numDays
cin>>numDays;
This line prints the required output and ends with a newline
cout<<"Days: "<<numDays<<endl;