Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Write a program to take a String as input then display the number of x characters word has in ascending order.

Example:

Enter a String

China is world most populous country

Number of 2 characters word : 1

Number of 4 characters word : 1

Number of 5 characters word : 2

Number of 7 characters word : 1

Number of 8 characters word : 1

Here, ascending is 2,4,5,7,8 don't return like 5,2,4,8,7

Hint: length(), charAt(), indexOf(), compareTo(), substring(), equals() can be used.

Note: Array, Split function as well as ternary operators i.e. ? : are not to be used.


New Dictionary

input is

42

output

AP

input

752

output

ABW


Draw circuit to R1<-R1^R2 which bit you want


Stale ingrediants program in python

input format is

11 12 -13 -15 15 19 18

output is

-13 -15 11 12 15 18 19


Highest sum of scores program

input format is

2

0 1 2

3 1 0


viva scores

output pattern:

3

13 12 11

2 1 0


Define a function named "isValidPassword" which take a string as parameter. The function will


then check if the supplied string fulfilled the following password criterias:


1) must have combination of uppercase and lowercase


2) must have at least 3 digits


3) must have at least 2 special character (including whitespace).


4) must have at least 10 characters (combination of alphanumeric and special symbol)


The function will return a Boolean value i.e. True if all criterias are met or return False


otherwise.


Make sure you test your function with every single possible input that may return False value


as well.


Define a function named "secondLarge" which take a list of numbers (integer) as parameter.


This function will then identify and return the 2nd largest number in the list. The function will


return smallest number if the parameter only contains two numbers. While the function will


return the only number if the list contain only single number. On some odd case, the function


will return -999 if the parameter contains other datatype i.e. string or floaat in the list.


FOR EXAMPLE:


• [1,2,3,4,5,6] returns 5


• [6,8,3,4,6] returns 6


• [53, 23] return 23


• [13] return 13


• [12, 'not number', 23] return -99220


Define a function named "excludeItem" which take two parameters (item1 & item2) and both


are list. This function will create a separate list named "result" which only include items found


in both lists. The result list should not have duplicate value.


For example, given item1 = [1,2,3,4,2,1] while item2 = [2, 4, 4, 2]. This function will return a


result of [2,4]. Note that the output value is unique (no duplicate). The function must be able


to accept other parameters as well i.e. list of strings or mixture of strings and digits


Define a function named "countCharacter" that accepts a sentence as parameter (string) and


calculate the total number of letters, total number of uppercase letters, total number of


lowercase letters, total number of digits and total number of characters that is not letter and


not digit.


The function will then return a list of integer representing total number of letters , number of


letters with uppercase and lowercase, number of digits and any other character beside letters


and digits.


Suppose the following input is supplied to the function


"Hell0 WorlD!!!4567" the function will return a list with the following values


[9, 3, 6, 5, 4]


LATEST TUTORIALS
APPROVED BY CLIENTS