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
maks197457 [2]
3 years ago
7

Microsoft Publisher - Assignment #1

Computers and Technology
1 answer:
Allisa [31]3 years ago
6 0

Answer:1

Explanation:

You might be interested in
PLEASE HELP! 25 POINTS!
irina [24]

Answer:

Its hard to answer unless im in the situation but id find a way to stop the car and figure out a way to get out and then call police

Explanation:

6 0
3 years ago
Read 2 more answers
Mhairi believes that if a site’s information is detailed enough, it is more likely to be true. Is she correct? Answers
inysia [295]
In my opinion, I would say No. So I think the answer is C.
6 0
2 years ago
Read 2 more answers
The police department in the city of Computopia has made all streets one-way. The mayor contends that there is still a way to dr
Korvikt [17]

Answer:

a

Explanation:

6 0
2 years ago
Write a program that first reads in the name of an input file and then reads the file using the csv.reader() method. The file co
DaniilM [7]

Answer:

Here is the Python code.

import csv  

inputfile = input("Enter name of the file: ")

count = {}

with open(inputfile, 'r') as csvfile:

 csvfile = csv.reader(csvfile)

 for line in csvfile:

   for words in line:

     if words not in count.keys():

       count[words] = 1

     else:

         count[words] + 1

   print(count)

Explanation:

I will explain the code line by line.

import csv   here the css is imported in order to read the file using csv.reader() method

inputfile = input("Enter name of the file: ")  This statement takes the name of the input file from the user

count = {}  this is basically a dictionary which will store the words in the file and the number of times each word appears in the file.

with open(inputfile, 'r') as csvfile:  This statement opens the inputfile using open() method in read mode. This basically opens the input file as csv type

 csvfile = csv.reader(csvfile)  This statement uses csv.reader() method to read the csv file contents.

for line in csvfile:  This outer for loop iterates through each line of the file

for words in line:  This inner loop iterates through each word in the line

if words not in count.keys():  This if condition checks if the word is not in the dictionary already. The dictionary holds key value pair and keys() method returns a list of all the keys of dictionary

count[words] = 1  if the word is not present already then assign 1 to the count dictionary

co unt[words] + 1 if the word is already present in dictionary increment count of the words by 1. Suppose the input file contains the following words:

hello,cat,man,hey,dog,boy,Hello,man,cat,woman,dog,Cat,hey,boy

Then because of co unt[words] + 1 statement if the word appears more than once in the file, then it will not be counted. So the output will be:

{' cat': 1, ' man': 1, ' dog': 1, ' woman': 1, ' Hello': 1, ' hey': 1, ' boy': 1, 'hello': 1, ' Cat': 1}

But if you want the program to count those words also in the file that appear more than once, then change this co unt[words] + 1 statement to:  

count[words] = count[words] + 1

So if the word is already present in the file its frequency is increased by 1 by incrementing 1 to the count[words]. This will produce the following output:

{' Cat': 1, ' cat': 2, ' boy': 2, ' woman': 1, ' dog': 2, ' hey': 2, ' man': 2, ' Hello': 1, 'hello': 1}  

You can see that cat, boy, dog and hey appear twice in the file.                    

print(count) This statement prints the dictionary contents with words and their frequencies.

The program with its output is attached.

3 0
3 years ago
Write a C++ program that creates a map containing course numbers and the room numbers of the rooms where the courses meet. The d
swat32

Answer:

Program approach:-

  • Using the necessary header file.
  • Using the standard namespace I/O.
  • Define the integer main function.
  • Mapping course numbers and room numbers.

Explanation:

//header file

#include<iostream>

#include<map>

//using namespace

using namespace std;

//main function

int main(){

               //creating 3 required maps

               map <string,int> rooms;

               map <string,string> instructors;

               map <string,string> times;

               //mapping course numbers and room numbers

               rooms.insert(pair<string,int>("CS101",3004));

               rooms.insert(pair<string,int>("CS102",4501));

               //mapping course numbers and instructor names

               instructors.insert(pair<string,string>("CS101","Haynes"));

               instructors.insert(pair<string,string>("CS102","Alvarado"));

               //mapping course numbers and meeting times

               times.insert(pair<string,string>("CS101","8:00am"));

               times.insert(pair<string,string>("CS102","9:00am"));

               

               char choice='y';

               //looping until user wishes to quit

               while(choice=='y' || choice=='Y'){

                               cout<<"Enter a course number: ";

                               string course;

                               cin>>course;//getting course number

                               //searching in maps for the required course number will return

                               //an iterator

                               map<string, int>::iterator it1=rooms.find(course);

                               map<string, string>::iterator it2=instructors.find(course);

                               map<string, string>::iterator it3=times.find(course);

               

                               if(it1!=rooms.end()){

                                               //found

                                               cout<<"Room: "<<it1->second<<endl;

                               }else{

                                               //not found

                                               cout<<"Not found"<<endl;

                               }

               

                               if(it2!=instructors.end()){

                                               cout<<"Instructor: "<<it2->second<<endl;

                               }

               

                               if(it3!=times.end()){

                                               cout<<"Meeting Time: "<<it3->second<<endl;

                               }

                               //prompting again

                               cout<<"\nDo you want to search again? (y/n): ";

                               cin>>choice;

               }

7 0
2 years ago
Other questions:
  • This is not a factor that you should use to determine the content of your presentation. Your audience your goals your purpose yo
    7·2 answers
  • THE DOMAIN IN AN EMAIL MESSAGE TELLS YOU THE
    11·1 answer
  • When you lost important information how do you gain the information back?
    14·2 answers
  • Please help with attached file
    8·2 answers
  • A ____ firewall keeps a record of the state of a connection between an internal computer and an external device and then makes d
    11·1 answer
  • Question 1
    13·1 answer
  • What is one advantage of using object-oriented programming?
    14·2 answers
  • A list of sources used for in-text citations that appears at the end of a document is called:
    10·1 answer
  • What is this?
    15·2 answers
  • BRIANLIEST!!!!!!!!!!!!!!!!
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!