Write a function percentage genders to accept a string

Assignment Help Computer Engineering
Reference no: EM131845621

Problem

1. Extend the form-letter recipe to take an input of a pet's name and type, and reference the pet in the form letter. "Your pet "+pet Type+","+pet Name+" will love our offer!" might generate "Your pet poodle, Fifi, will love our offer!".

2. Imagine that you have a list of the genders (as single characters) of all the students in your class, in order of their last name. The list will look something like "MFFMMMFFMFMMFFFM" where M is male and F is female. Write a function (below) percentage Genders(string) to accept a string that represents the genders. You are to count all of the M's and F's in the string and print out the ratio (as a decimal) of each gender. For example, if the input string were "MFFF," then the function should print something like, "There are 0.25 males, 0.75 females."

Reference no: EM131845621

Questions Cloud

Write a function fixIt Up that takes a string as input : Write a function fixIt Up that takes a string as input and returns a string with the characters put the way that they ought to have been.
Organisation for economic co-operation and development : The Organisation for Economic Co-operation and Development (OECD) is a group of 34 of the world's most advanced countries
Compute the cost per unit for each product : Compute the cost per unit for each product. (Round intermediate calculations and final answers to 2 decimal places.)
What are business ethics : Should scientists who study consumer behavior remain impartial, or is it appropriate for them to become involved in the topics they research.
Write a function percentage genders to accept a string : Write a function (below) percentage Genders(string) to accept a string that represents the genders. You are to count all of the M's and F's in the string.
Define legitimacy-representation-accountability : Define legitimacy, representation, accountability and transparency and explain the relationships between them. give examples of each
Resolving a conflict to resolutions involving enforcement : Discuss, explain and contrast peaceful means (excluding peacekeeping operations) of resolving a conflict to resolutions involving enforcement
What is the difference between a function and a method : What's the difference between a function and a method? What are some advantages that vector-based graphics have over bitmap graphical representations.
Explain the different types of peacekeeping missions : Explain the different types of peacekeeping missions and the main activities that a peacekeeping mission gets involved in including capacity building.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd