Write a Python function that takes a string input and checks…
Write a Python function that takes a string input and checks the number of vowel (a, e, i, o, u, A, E, I, O, U) and consonant. Print the number of vowels and consonants. (Hint: Use the char.isapha() function in an if condition statement. isalpha() is used to check if a string consists only of alphabetic characters). Guide: Create function name and input parameter (one line of code) Create variables for vowels and initialize it to the value given in the question. Creating two variables to count number of variables and number of consonants and initialize them to 0. Use for loop to iterate each character (char) in an input string (input parameter to functions) Under the for loop use if to call isalpha function: char.isalpha(): Use if to check characters (char) which are vowels Increment number of vowels if condition is true else increment number of consonants.
Read DetailsUse the information in Exhibit 1 to answer the following fou…
Use the information in Exhibit 1 to answer the following four questions. Exhibit 1: Agatha Corp. Agatha Corp. manufactures office supplies that it specifically creates for recent college graduates. One of their most popular items in recent years is the ‘Witches Road’ annual planner that is accompanied by accessories such as stickers, highlighters and spells. Agatha currently uses a single plant-wide rate of $14 per Direct Labor hour (DLH) to allocate their Manufacturing Overhead (MOH) costs. Rio Vidal, the controller, would like to determine whether a switch to Activity-Based Costing (ABC) would prove to be a beneficial planning tool for Agatha Corp. moving forward. Rio has identified three key activities that would be used for ABC: Production, Supervisor Wages, and Quality Inspections. Sarah has compiled the following budgeted MOH cost data for the annual planner: Activity Budgeted Cost Budgeted Quantity of Cost Driver Budgeted Activity Rate Production $309,870 30,000 machine hours $10.33 Supervisor Wages 98,946 4,668 hours $21.20 Quality Inspection 106,440 10,240 inspection hours $10.39 Total $515,256 The actual usage of resources for manufacturing the ‘Witches Road’ annual planner includes $27,360 in DM costs; 37,000 DL hours; 28,500 machine hours; 4,500 supervisor hours; and 9,800 inspection hours. The ABC allocated based on the previous information is $491,627, calculated as follows: Activity Calculation ABC Cost Production $10.33 per machine hour × 28,500 machine hours $294,405.00 Supervisor Wages $21.20 per hour × 4,500 hours 95,400.00 Quality Inspection $10.39 per inspection hour × 9,800 inspection hours 101,822.00 Total $491,627.00
Read Details