Question

1. Write a Python function that accepts a string and calculate the number of upper case...

1. Write a Python function that accepts a string and calculate the number of upper case letters and lower case letters. Sample String : 'The quick Brow Fox' Expected Output : No. of Upper case characters : 3 No. of Lower case Characters : 12

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
1. Write a Python function that accepts a string and calculate the number of upper case...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • PYTHON, write a function that accepts a text file's name and returns a. the number of...

    PYTHON, write a function that accepts a text file's name and returns a. the number of uppercase letters in the file b. the number of lowercase letters in the file c. the number digits in file d. the number of whitespace characters in the file

  • In python Exercise 4 (graded) Write a function "passValidate" that takes a string "s" and checks...

    In python Exercise 4 (graded) Write a function "passValidate" that takes a string "s" and checks the validity of string as a password Validation Rules: At least 1 lowercase letter between [a-z] and 1 upper case letter between [A-Z]. At least 1 number between [0-9 At least 1 character from [$#@]. Minimum length 6 characters. Maximum length 16 characters. CS103-Lab 13 Page 3 of 3 Sample Input: s"Uab@2762" Sample Output: True

  • PYTHON You are to write a program that will analyze the frequency of letters in a...

    PYTHON You are to write a program that will analyze the frequency of letters in a string. The user will enter a string, your program will output the number of times the letters of the alphabet appear in that string. The user is to enter a string that has upper or lower case letters only, no spaces or other characters. You should convert the string entered to all lowercase letters before you conduct your analysis.

  • Python please Write a function print_back_upper() that accepts a string my_str as an argument and displays...

    Python please Write a function print_back_upper() that accepts a string my_str as an argument and displays the string backwards and in uppercase, all in one line (Note: Create any necessary variables) For example: if my_str = "Python" then, your output should display as follows: NOHTYP (Hint: You can use for loop navigating up to range of len of string-1, -1, -1 and use reverse() and upper() functions to create and display the string backwards in uppercase)

  • Write a python function called gen_pattern that accepts a string as an argument. Your function should...

    Write a python function called gen_pattern that accepts a string as an argument. Your function should generate a string pattern based on argument provided: If the string provided is a number and that number is even generate a pattern of hash signs. ex. gen_pattern(‘4’): #### If the string provided is odd, generate pattern of stars. Ex: gen_pattern(3): *** If string is not a number just output “ Not a number”

  • Swap Cases - Write a python program to swap cases. LowerCase letters to Upper case and...

    Swap Cases - Write a python program to swap cases. LowerCase letters to Upper case and vice versa (10 points) Input : Www.PyDev.com Output: wWW.pYdEV.COM Input: Pythonist 2 Output: pYTHONIST 2 b) Manipulate Strings - Insert a sequence of characters into the specified position in the given String(10 points) Input : First Line contains the string to be manipulated Second Line contains the string to be inserted and the position Number Output : The modified string Sample Input & Output:-...

  • C++ Lab Quiz #3-B Upper Case Letters Write a main() program that reads a string and...

    C++ Lab Quiz #3-B Upper Case Letters Write a main() program that reads a string and calls the function int countUpper(string) which counts and returns the number of upper case letters in the string. The main) prints the result Sample inputs/outputs: nter a string: This is a C++ quIz numBer 4 This is a C++ quIz numBer 4" has 5 upper letters

  • Do in Python Problem 2 Assume s is a string of lower case characters. Write a...

    Do in Python Problem 2 Assume s is a string of lower case characters. Write a program that prints the number of times the string ' lol' occurs in s For example, if s= 'azclololegghakl', then your program should print S Number of times lol occu rs is: 2 Problem 3 Assume s is a string of lower case characters Write a program that prints the longest substring of s in which the letters occur in alphabetical order. For example,...

  • CODIO python problem Write a function isRed() that accepts a string parameter and looks for the...

    CODIO python problem Write a function isRed() that accepts a string parameter and looks for the presence of the word ‘red’ in the string. If it is found, return boolean True otherwise False. Finally output the result of calling the function with the value in text.

  • Simple Python Program Working with strings Write a Python program to read in a number of...

    Simple Python Program Working with strings Write a Python program to read in a number of strings from the user. Stop when the user enters “Done”. Then check if each of the strings contains all the letters of the alphabet. Print the results in the form of a dictionary, where they keys are the strings and the values are the Truth Value for the string, which you just calculated. Sample Run: Enter the strings: taco cat The quick brown fox...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT