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 12 cs chapter 2

12. Name the function/method required to

sa 12 cs chapter 2 / PythonCSIP CS IP

12. Name the function/method required to Read More »

2. Write a short Python code segment that adds up the lengths of all the words in a list and then prints the average (mean) length. Use the final list from previous question to test your program.

sa 12 cs chapter 2 / PythonCSIP CS IP

# Code l = [‘No’, ‘country’, ‘has’, ‘ever’, ‘won’, ‘a’, ‘war’] c = 0 for word in l: c += len(word) print(‘Mean length of the words in the list is :’, c/len(l)) # len(l) gives number of words in the list

2. Write a short Python code segment that adds up the lengths of all the words in a list and then prints the average (mean) length. Use the final list from previous question to test your program. Read More »

Post pagination
← Previous 1 … 9 10 11 … 22 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.