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
Aleksandr [31]
4 years ago
11

What is the difference between hardware and software?

Computers and Technology
1 answer:
DIA [1.3K]4 years ago
4 0

Answer:

Computer hardware is any physical device used in or with your machine, whereas software is a collection of code installed onto your computer's hard drive. For example, the computer monitor you are using to read this text and the mouse you are using to navigate this web page are computer hardware.

Explanation:

You might be interested in
Write a program that reads in your question #2 Python source code file and counts the occurrence of each keyword in the file. Yo
scoray [572]

Answer:

Here is the Python program:

import keyword  #module that contains list of keywords of python

filename = input("Enter Python source code filename: ") # prompts user to enter the filename of a source code

code = open(filename, "r") # opens the file in read mode

keywords = keyword.kwlist #extract list of all keywords of Python and stored it into keywords

dictionary = dict() #creates a dictionary to store each keyword and its number of occurrence in source code

for statement in code: # iterates through each line of the source code in the file

   statement = statement.strip() # removes the spaces in the statement of source code  

   words = statement.split(" ") #break each statement of the source code into a list of words by empty space separator

   for word in words:# iterates through each word/item of the words list  

       if word in keywords:#checks if word in the code is present in the keywords list of Python  

           if word in dictionary: #checks if word is already present in the dictionary

               dictionary[word] = dictionary[word] + 1 #if word is present in dictionary add one to the count of the existing word

           else: #if word is not already present in the dictionary  

               dictionary[word] = 1 #add the word to the dictionary and set the count of word to 1

for key in list(dictionary.keys()): #iterates through each word in the list of all keys in dictionary  

   print(key, ":", dictionary[key])# prints keyword: occurrences in key:value format of dict

Explanation:

The program is well explained in the comments attached with each line of the program.  

The program prompts the user to enter the name of the file that contains the Python source code. Then the file is opened in read mode using open() method.

Then the keyword.kwlist statement contains the list of all keywords of Python. These are stored in keywords.

Then a dictionary is created which is used to store the words from the source code that are the keywords along with their number of occurrences in the file.

Then source code is split into the lines (statements) and the first for loop iterates through each line and removes the spaces in the statement of source code .

Then the lines are split into a list of words using split() method. The second for loop is used to iterate through each word in the list of words of the source code. Now each word is matched with the list of keywords of Python that is stored in keywords. If a word in the source code of the file is present in the keywords then that word is added to the dictionary and the count of that word is set to 1. If the word is already present in the dictionary. For example if there are 3 "import" keywords in the source code and if 1 of the import keywords is already in the dictionary. So when the second import keyword is found, then the count of that keyword is increased by 1 so that becomes 2.

Then the last loop is used to print each word of the Python that is a keyword along with its number of occurrences in the file.

The program and its output is attached in a screenshot. I have used this program as source code file.

7 0
3 years ago
Select the protocol data units.
Masja [62]

Answer: 4. Data 2. segment  7.packet 3.frame  1.bit

Explanation:

3 0
3 years ago
Read 2 more answers
Swiping and pinching are graphical user interface (gui) _____________.
Sergeu [11.5K]
Swiping and pinching are graphical user interface (gui) to zoom in or zoom out.  <span>One of the many multitouch gestures on today's laptops is the ability to </span>pinch<span> two fingers to </span>zoom<span> in and </span>out<span> in a window. </span>
6 0
4 years ago
Read 2 more answers
Please give all the answer​
il63 [147K]

Answer:

am/is=was

are=were

do=did

go=went

eat=ate

have=had

make=made

take=took

see=saw

fly=flew

sell=sold

tell=told

find=found

sent=sent

Explanation:

These are all present/ past tense

I hope this helps.

5 0
3 years ago
Read 2 more answers
Python
Viefleur [7K]

Answer:

HH

Explanation:

5 0
3 years ago
Other questions:
  • How are the stop lamp bulbs connected in relation to each other? a. In parallel. b. In series. c. In series/parallel. d. None of
    13·1 answer
  • According to the chart, which degree would you have to earn in order to make the most amount of money? A bar graph titled Averag
    13·2 answers
  • URLs are directions that browsers follow in order to find specific web page files. What is the first part of the URL that is the
    14·1 answer
  • How would you create a tint of a color?
    6·1 answer
  • Ophelia is entering a Get Fit! sporting goods store in a shopping mall when her heel gets caught in a heating grate at the thres
    9·1 answer
  • Which of the following skills do employers in any field expect their employees<br> to have?
    5·1 answer
  • Which of the following would not be stored in a cell ?
    14·1 answer
  • Why is it important to prevent financial loss
    7·1 answer
  • You want to read input from the user to know how many apples they would like
    10·1 answer
  • Internet transportation exchanges brings together shippers who post __________ and carriers that post __________ in order to arr
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!