Someone please answer the following questions.
Question 1:
Write code to generate the following histogram display based on the frequency of occurrence of characters in the first argument to the program. Example:
$ perl histogram.pl "Mississippi borders Tennessee."
s: #######
e: #####
i: ####
: ##
n: ##
p: ##
r: ##
.: #
M: #
T: #
b: #
d: #
o: #
Question 2:
Write a Python program to create an associative array ("hash") named "last_name"
whose keys are the five first names "Mary", "James", "Thomas", "William", "Elizabeth".
Set the corresponding values for these keys to be "Li", "O'Day", "Miller", "Garcia", "Davis".
Then print out the five full names, each on its own line, sorted primarily by length of last name
and with a secondary sort alphabetically by first name.
Question 3:
Given a string consists of different types of brackets, write a function to determine the string is balanced. For example, " ([])" and "[]{}" are balanced but "([)]" and "](){" are not. You can assume these are the only characters in the string: ()[]{}
Question 4:
If the string in Question 3 only consists of ( and ), how would it affect your solution from above? For example: " (())" or " (()("
Question 5:
Suppose we want to preprocess JSON strings to strip out C style line comments. An example might look like this:
// this is a comment
{ // another comment
true, "foo", // 3rd comment
"http://www.ariba.com" // comment after URL
}
Write a function to strip line comments without using regular expressions. Think about the other corner cases
8 years ago
20
Purchase the answer to view it

- HSA 525 Week 9 Assignment 3 Post-Merger Analysis
- discussion
- writing paper, topic about issue of media, need to write the body paragraphs and finalize it. 5-6 page
- peer review need done in 45min
- Leadership and Performance in the Workplace
- wk 8 Cyber Sec Paper
- PAY $18 NEED BY 5:00PM TUESDAY 02/23/16, NO PLAGIARISIM PLEASE
- Help with homework
- Article Review: Hospital Expansion
- Respond to both
