Skip to content
Pooja Bhatia Classes Hari Nagar
  • We teach following classes
    • Class 12
    • Class 11
    • Class 10
    • Class 9
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship
Pooja Bhatia Classes Hari Nagar

sa 11 ip chapter 8

3. Create a dictionary whose keys are month names and whose values are the number o f days in the corresponding months.

sa 11 cs chapter 13, sa 11 ip chapter 8 / PythonCSIP CS IP

3. Create a dictionary whose keys are month names and whose values are the number o f days in the corresponding months. Read More »

2. Write a program that repeatedly asks the user to enter product names and prices. Store all of these in a dictionary whose keys are the product names and whose values are the prices. When the user is done entering products and prices, allow them to repeatedly enter a product name and print the corresponding price or a message if the product is not in the dictionary.

sa 11 cs chapter 13, sa 11 ip chapter 8 / PythonCSIP CS IP

# Code n = int(input(‘Enter number of products : ‘)) prod = {} for i in range(n): p = input(‘Enter product name : ‘) prod[p] = int(input(‘Enter its price : ‘)) q = True while q: p = input(‘Enter product for price or q to exit : ‘) if p == ‘q’: break if p

2. Write a program that repeatedly asks the user to enter product names and prices. Store all of these in a dictionary whose keys are the product names and whose values are the prices. When the user is done entering products and prices, allow them to repeatedly enter a product name and print the corresponding price or a message if the product is not in the dictionary. Read More »

Post pagination
← Previous 1 2 3 … 20 Next →
  • We teach following classes
    • Class 12
    • Class 11
    • Class 10
    • Class 9
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship
  • We teach following classes
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship

Copyright © 2025 Pooja Bhatia Classes Hari Nagar | Powered by Pooja Bhatia Classes Hari Nagar.