. Write a function called count_upper that returns the number of uppercase characters that appear in...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
. Write a function called count_upper that returns the number of uppercase characters that appear in the input parameter "my_string". Write a print_percentage that takes a string as its parameter and prints the percentage of uppercase letters in that string. Make sure you use the count_upper function to calculate the uppercase percentage. Use the following formula to find the uppercase percentage: uppercase rate = number of uppercase letters / total number of characters (uppercase percentage is the uppercase rate printed in percentage format) Find the percentage of the uppercase characters in the following strings: "Hello, My Name is ABC." "#012%6jjx: This is NOT GOOD" The output should be as follows: Percentage of uppercase letters in "Hello, My Name is ABC." is: 27.27% Percentage of uppercase letters in "#012%6jjx: This is NOT GOOD" is: 33.33% . Write a function called count_upper that returns the number of uppercase characters that appear in the input parameter "my_string". Write a print_percentage that takes a string as its parameter and prints the percentage of uppercase letters in that string. Make sure you use the count_upper function to calculate the uppercase percentage. Use the following formula to find the uppercase percentage: uppercase rate = number of uppercase letters / total number of characters (uppercase percentage is the uppercase rate printed in percentage format) Find the percentage of the uppercase characters in the following strings: "Hello, My Name is ABC." "#012%6jjx: This is NOT GOOD" The output should be as follows: Percentage of uppercase letters in "Hello, My Name is ABC." is: 27.27% Percentage of uppercase letters in "#012%6jjx: This is NOT GOOD" is: 33.33%
Expert Answer:
Answer rating: 100% (QA)
1 def countuppermystring count 0 for char in mystring if charisupper count 1 return count Answ... View the full answer
Related Book For
Posted Date:
Students also viewed these general management questions
-
Booles Rule for numerical integration on the interval [a,b] is given by (a) Show that the degree of precision of this formula is 5. (b) Develop the Composite Booles Rule for integration on [a,b]....
-
The angle of the pendulum of Figure b is given by = m cos [(4.44 rad/s)t + ]. If at t = 0, 9 = 0.040rad and d/dt = 0.200 rad/s, what are (a) The phase constant and (b) The maximum angle m ?
-
Show that (Use integration by parts.) Express this formula as a probabilistic relationship between Poisson and gamma random variables. zys =1,2, 3, . . . . ,
-
Consider the Cobb-Douglas production function f(x, y) = 300x0.85, 0.15 When x = 4000 and y = 800, find the following. (Round your answers to two decimal places.) (a) the marginal productivity of...
-
a) How many cells does a K-map in six variables have? b) How many cells are adjacent to a given cell in a K-map in six variables?
-
A common punishment for school children is to write out a sentence multiple times. Write a Python stand-alone program that will write out the following sentence one hundred times: I will never spam...
-
North Shore Architectural Stone, Inc., a company that installs limestone in residential and commercial buildings, agreed to supply and install limestone for a property owned by Joseph Vitacco. North...
-
Jenny Kane and Cindy Travis borrowed $15,000 on a 7-month, 8% note from Golden State Bank to open their business, KTs Coffee House. The money was borrowed on June 1, 2014, and the note matures...
-
A vehicle of mass m = 1500kg travels on a circular curve of radius R = 1km at a speed of v = 10m/s. There is static friction between the road and the vehicle's tires. R Road with a circular curve of...
-
SlowRider Inc. had a rudimentary business intelligence (BI) system. Analysts at SlowRider Inc. pulled data from three different ERP systems, loaded the data into Excel spreadsheets, and e-mailed...
-
Why is assessing the process or measuring Board's performance important? Explain How significant are the roles of the board of directors in a corporation? Explain
-
Your company has several running projects that were financed with various types of loans. It would like to start one more project, and finance the purchase of PROFIT the production equipment when the...
-
Your application is using ASG, and an ALB distributes traffic to the ASG. You want to add a scaling policy that keeps the average aggregate CPU utilization of the ASG to be 8 0 percent. The capacity...
-
Data for Questions 1 and 2 A reservoir has a drainage radius of 1500 ft, thickness of 100 ft, horizontal permeability of 20 md and a vertical permeability of 2 md. The oil viscosity is 2.5 cp and the...
-
Determine expressions for the mean residence time given "outward" diffusional release into a perfect sink from a) A cylindrical monolithic device of radius a, with ends capped. b) A spherical device...
-
You work as a financial analyst for the CFO of a big company, you have been asked to consider the following cash flows (Millions) from two mutually exclisive capital budgeting projects. If the firm's...
-
Mr. Alexander is students. a. is a 6th-grade mathematics teacher who is monitoring the progress of all Score Imani's week 6 probe by digits correct.
-
It is possible to investigate the thermo chemical properties of hydrocarbons with molecular modeling methods. (a) Use electronic structure software to predict cHo values for the alkanes methane...
-
Another way in which underlying assumptions can be violated is if there is correlation in the sampling, which can seriously affect the properties of the sample mean. Suppose we introduce correlation...
-
Let X have the pdf (a) Find the pdf of Y = X2 (b) Find EY and Var Y. 2
-
Binomial data gathered from more than one population are often presented in a contingency table. For the case of two populations, the table might look like this: where Population 1 is binomial(n1,...
-
Discretize the product of two functions, as compared to discretizing each function independently, and describe what that means in the language of kets.
-
Show how \(\delta^{\prime \prime}(x-y)\) (the second derivative with respect to \(x\) ) acts as a distribution on functions.
-
For a tensor product of kets, describe what the norm is in the abstract sense, and then in the function form (with integrals).
Study Master Accounting Teachers Guide Grade 10 Teacher's 1st Edition - ISBN: 110761581X - Free Book
Study smarter with the SolutionInn App