Computer Science, asked by kartavyaking1212, 4 days ago

Create a dictionary in python whose keys are “name of months” and values are “No. of days” in corresponding Month.​

Answers

Answered by AnanyaBaalveer
4

Answer:

  • Make a college of all the available newspaper cutting which carries the news of upcoming election and mention the associated headline .

Explanation:

  • HOPE HELPFUL
Answered by priyarksynergy
2

Given below is the program for creating a python dictionary.

Explanation:

  • A python dictionary is an in- built data structure offered by python programming language.
  • A python dictionary is always declared and represented in curly brackets '{ }'.
  • A python dictionary accepts and stores a pair of data values known as Keys and their corresponding Values.
  • These keys and values are separated by a colon ':' and each of these key-value pairs are separated by commas ' , '.
  • Hence the required dictionary of months and its days is,
  • PROGRAM:
  • myDct= {  
  •        'January' : 31,
  •         'February' : 28,
  •         'March' : 31,
  •          'April' : 30,
  •          'May' : 31,
  •          'June' : 30,
  •          'July' : 31,
  •          'August' : 31,
  •           'September' : 30,
  •           'October' : 31,
  •           'November' : 30,
  •           'December' : 31
  • }

Similar questions