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
Anna007 [38]
3 years ago
10

Create a dictionary with types as integer and string.

Computers and Technology
1 answer:
Airida [17]3 years ago
7 0

Answer:

In c#  Dictionary is the collection of keys and value .The dictionary is a generic collection class which is in the System.Collection.Generics namespace. we can represent dictionary like that Dictionary<TKey, TValue> where TKey represent the type of key and TValue is the type of TValue.

Following are the example which represent dictionary as integer and string

using System.Collections.Generic;  // namespace

class Test // class test

{

   static void Main()  // main method

   {

       

       var ob = new Dictionary< int,string>();  // type integer and string

       dictionary.Add( 2,"hello");

       dictionary.Add(143,"hello1);

       // The dictionary has 2 pairs.

       Console.WriteLine("DICTIONARY 1 " + ob.Count);

}

}

Output:

DICTIONARY 1 :2

Explanation:

In this program we create a dictionary generic class which is integer and string type after that we add the elements in the dictionary by   "dictionary.Add method " and finally print the count of dictionary

You might be interested in
Which one of these do you need to become president of the US ?
gladu [14]

Answer:

Tbh i dont even know

Explanation:

I had who i wanted to become president but i don't even know anymore

7 0
2 years ago
Read 2 more answers
A hardware compatibility list recommends striping with double parity as storage for an application. In a test environment, a tec
riadik2000 [5.3K]

Answer:

RAID level 5 can be used to compensate a limited number of available disks.

Explanation:

There are two type of RAID

  • Software RAID
  • Hardware RAID

Software RAID

deliver services form the host.

Hardware RAID

provides hardware services.

RAID has levels

0, 1, 5, 6, and 10

RAID 0, 1, and 5 work on both HDD and SSD media,

4 and 6 also work on both media.

RAID 0 :Striping

In this level minimum of two disks,RAID 0 split the file strip the data.Multiple hard drive are used to split the data.

RAID 1 : Mirroring

In this level Minimum two disk require and provide data tendency.

RAID 5 :Stripping with parity

Parity is a binary data.RAID system calculate the value which system used to recover the data.

Most RAID system with parity function store parity blocks.

RAID 5 combines the performance of RAID 0 with redundancy of RAID 1.

RAID 5 level should minimize the fault tolerance.

4 0
3 years ago
6 The part of the computer that contains the brain or central processing unit is also known as the ?
Olin [163]
Answer:  "CPU" .
________________________________
4 0
3 years ago
When comparing alternative methods for making information systems identification and selection decisions, top management's selec
Softa [21]

Answer: b) False

Explanation:

Alternative method that is used for information system consisting of prototyping, outsourcing, end-user development mechanism, system life cycle etc for building a system.

  • These process consist of focusing on user requirement, using high level programming languages, development of prototype,creation of package, database etc instead of cross-sectional phase,selection decisions,top management option etc.
  • Therefore, the correct option is option(b) as the statement is false.
3 0
3 years ago
Hello, I've tried everything and I cannot get this code to be fair. I need help. Can someone provide guidance so I can understan
Liula [17]

A program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day is given below:

<h3>The Program</h3>

input_month = input()

input_day = int(input())

months= ('January', 'February','March', 'April' , 'May' , 'June' , 'July' , 'August' , 'September' , "October" , "November" , "December")

if not(input_month in months):

  print("Invalid")

elif input_month == 'March':

   if not(1<=input_day<=31):

       print ("Invalid")

   elif input_day<=19:

       print("Winter")

   else:

      print ("Spring")

elif input_month == 'April' :

   if not(1<=input_day<=30):

       print("Invalid")

   else:

      print("Spring")

elif input_month == 'May':

   if not(1<=input_day<=31):

       print("Invalid")

   else:

       print("Spring")

elif input_month == 'June':

   if not(1<=input_day<=30):

       print("Invalid")

   elif input_day<=20:

       print ("Spring")

   else:

       print("Summer")

elif input_month == 'July' or 'August':

   if not(1<=input_day<=31):

       print("Invalid")

   else:

       print("Summer")

elif input_month == 'September':

   if not(1<=input_day<=30):

       print("Invalid")

  elif input_day<=21:

       print ("Summer")

   else:

       print ("Autumn")

elif input_month == "October":

   if not(1<=input_day<=31):

      print("Invalid")

   else:

       print("Autumn")

elif input_month == "November":

   if not(1<=input_day<=30):

       print("Invalid")

   else:

       print ("Autumn")

elif input_month == "December":

   if not(1<=input_day<=31):

       print("Invalid")

   elif input_day <=20:

       print ("Autumn")

   else:

       print ("Winter")

elif input_month == 'January':

   if not(1<=input_day<=31):

       print("Invalid")

   else:

       print("Winter")

elif input_month == "February":

   if not(1<=input_day<=29):

       print("Invalid")

   else:

       print ("Winter")

Read more about programming here:

brainly.com/question/23275071

#SPJ1

5 0
1 year ago
Other questions:
  • What concerns do you need to have with individuals hacking your information, computer, personal devices, and car? How can you pr
    5·1 answer
  • If you see ##### in a cell, you should
    10·1 answer
  • What could be one rule to help your friend to blog safely
    6·2 answers
  • A research team is studying parallel computing. They want to run parallel processes without having to use multiple processors. H
    15·2 answers
  • Dillard’s wants to learn about its consumers' attitudes toward online purchases. There are numerous studies that are available a
    9·1 answer
  • In general, digital to analog modulation equipment is less expensive than the equipment for encoding digital data into a digital
    8·1 answer
  • I'd: 9872093250, password: qqqqq, join the meeting​
    11·1 answer
  • What is data? why is it important to collect data ? explain the points.​
    10·1 answer
  • Please help me in this question​
    7·2 answers
  • Which skill type refers to the ability to interact and communicate effectively with people? skills refer to the ability to inter
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!