Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Using Python version 2.7, design a program that prompts the user to enter a string.The program should then display the number of vowels and the number of consonants in the string. I am absolutely lost and don't even know how to start, any assistance would be appreciated.
I will also provide the pseudocode that was provided by the teacher, if it helps at all:
// main moduleModule main() // Variables Declare String str Declare Integer index Declare Integer vowels = 0 Declare Integer consonants = 0 // Get input from the user. Display "Enter a string." Input str
// Scan the string counting vowels and consonants. For index = 0 To length(str) - 1 If isVowel(str(index)) Then Set vowels = vowels + 1 Else If isConsonant(str(index)) Then Set consonants = consonants + 1 End If End For // Display the results. Display "Vowels: " , vowels Display "Consonants: " , consonantsEnd Module// The isVowel function returns True if the argument// is a vowel, or False otherwise.Function Boolean isVowel(String ch) Declare Boolean status // Flag // Convert the argument to uppercase. ch = toUpper(ch) // Is ch a vowel? If ch == "A" OR ch == "E" OR ch == "I" OR ch == "O" OR ch == "U" Then Set status = True Else Set status = False End If Return statusEnd Function// The isConsonant function returns True if the argument// is a consonant, or False otherwise.Function Boolean isConsonant(String ch) Declare Boolean status // Flag // Is ch a letter? If isLetter(ch) Then // Is ch not a vowel? If NOT isVowel(ch) Then Set status = True Else Set status = False End If Else Set status = False End If Return statusEnd Function
Implement what is kind of the inverse of our Producer - Consumer, where many Producers supply a limited capacity consumer.
find the shortest path between each pair of nodes using Floyd's method
For random geometric graph, G(n, r), evaluate average degree of a vertex: at least distance r from boundary, on boundary (convex hull), and estimate time (big Oh) of determining all edges employing: all vertex pairs testing.
Use map to define the following functions: convert-euro, which converts a list of U.S. dollar amounts into a list of euro amounts based on an exchange rate of 1.22 euro for each dollar.
Define a pure abstract base class called BasicShape. The BasicShape class should have the following members.
Write the MATLAB statements required to calculate and print out the squares of al the even integers between 0 and 50. Create a table consisting of each integer and its square, with appropriate labels over each column. I MUST use a while loop but I..
Write a Main Program which will prompt the user for how many numbers they which to enter as an integer counter (numcount) variable. The program should then prompt the user to enter each number using a loop and then output the average of the number..
For your initial post, provide your own description of what the computer considers "TRUE" and what the computer considers "FALSE." Then, provide at least two code examples (original examples) that would return TRUE
In general, is it possible to solve arbitrarily large problem in a fixed amount of time, given that unlimited number of processing elements is available? Explain why?
Write a MIPS assembly language program that adds two integers and displays the sum and the difference.
The computeShippingCharges() method should use sentinel-controlled repetition to allow a user to enter shipping data until the user has indicated that he or she is done. The total shipping charges will be computed and returned as a double value.
Can you suggest a way to roughly find out the web servers (outside your department) which are not popular among the users in the department? Describe.
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!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd