Skip to content

Commit

Permalink
Day 8 questions added
Browse files Browse the repository at this point in the history
  • Loading branch information
Soumyakanta06 committed Sep 28, 2021
1 parent e8a312d commit c165630
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Day 8/Problem Statement 8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
While checking the English papers of the board exams ,the professor often gets frustated by the writing format of words of the student in the examination paper. The words were a net mix of upper case and the lower case letters in every words. An idea struck into the mind of the professor to develop an extension that would change the letters' register in every word so that it either only consisted of lower case letters or, vice cersa, only of uppercase ones. At that as little as possible letters should be changed in the word. For example, the word HoUse must be replaced with house, and the word ViP — with VIP.

If a word contains an equal number of uppercase and lowercase letters, you should replace all the letters with lowercase ones. For example, maTRIx should be replaced by matrix. Your task is to use the given method on one given word.

Input Description:-
- First line of input consists of t, the number of test cases
- Next t lines each consists of:
String: string comprising both upper and lower case letters

Input variables:
int t: No. of test cases
String : string comprising both upper and lower case letters

Output Description:
Print the corrected word. If the given word has strictly more uppercase letters, make the word written in the uppercase register, otherwise - in the lowercase one.

Constraints:
1<=t<=4
A,a<=value of each character<=Z,z

Sample Input:
3
HoUse
ViP
maTRIx


Sample Output:
house
VIP
matrix





5 changes: 5 additions & 0 deletions Day 8/input_8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
4
DBBZJCWQEVGYHEEUHJAWRHBDPsnplijbwtdibqrrheebfxqcvn
KSXBXWpebh
qvxpQullmcBEGSdskddortcvxyqlBVXMMKHevovn
KSXBXWpebhERPZGrodyuBNHWpnpawg

0 comments on commit c165630

Please sign in to comment.