HackerRank Solution: Python Capitalize! [4 Methods]
By Bashir Alam
Question: Capitalize! [Python Strings] You are asked to ensure that the first and last names of people begin with a capital letter in their passports. ...
By Bashir Alam
Question: Capitalize! [Python Strings] You are asked to ensure that the first and last names of people begin with a capital letter in their passports. ...
By Bashir Alam
Question: Python Alphabet Rangoli You are given an integer, N. Your task is to print an alphabet rangoli of size N. (Rangoli is a form ...
By Bashir Alam
Question: Python String Formatting [Strings] Given an integer, n, print the following values for each integer i from 1 to n: Decimal Octal Hexadecimal (capitalized) ...
By Bashir Alam
Question: Designer Door Mat [Python Strings] Mr. Vincent works in a door mat manufacturing company. One day, he designed a new door mat with the ...
By Bashir Alam
Question: Text Wrap [Python Strings] You are given a string S and width w. Your task is to wrap the string into a paragraph of ...
By Bashir Alam
Question: Text Alignment [Python Strings] In Python, a string of text can be aligned left, right and center. .ljust(width) This method returns a left-aligned string ...
By Bashir Alam
Question: String Validators [Python Strings] Python has built-in string validation methods for basic data. It can check if a string is composed of alphabetical characters, ...
By Bashir Alam
Question: Find a String [Python Strings] In this challenge, the user enters a string and a substring. You have to print the number of times ...
By Bashir Alam
Question: Summing the N series [Python Fundamentals] There is a sequence whose term nth is: Evaluate the series: Find Sn mod (10^9 + 7) Example ...
By Bashir Alam
Question: Python Possible Path [Mathematics] Adam is standing at point (a, b) in an infinite 2D grid. He wants to know if he can reach ...
By Bashir Alam
Question: Python sWAP cASE [Strings] You are given a string and your task is to swap cases. In other words, convert all lowercase letters to ...
By Bashir Alam
Question: Python String Split and Join In Python, a string can be split on a delimiter. Example: >>> a = "this is a string" >>> ...
By Bashir Alam
Question: What's your name? [Python Strings] You are given the firstname and lastname of a person on two different lines. Your task is to read ...