Monday, October 12, 2020

thumbnail

Alphabet Rangoli - HackerRank Solution

 Hello Guys,

Recently I had a video on my Youtube channel, where I solved one of its questions form the String - Python section.

Problem Statement

You are given an integer, n. Your task is to print an alphabet rangoli of size n. (Rangoli is a form of Indian folk art based on the creation of patterns.)

Different sizes of alphabet rangoli are shown below:


#size 3


#size 5


#size 10

The center of the rangoli has the first alphabet letter a, and the boundary has the alphabet letter (in alphabetical order).

Input Format

Only one line of input containing, the size of the rangoli.

Range 

0 <= n <= 27

Output Format

Print the alphabet rangoli in the format explained above.

Sample Input

n = 5

Sample Output

Here is the code,


Get the explanation to this here...


By this I thankyou to read this blog...
I hope it helps.
Subscribe to the blog and my YouTube channel...

Thanks...



Subscribe by Email

Follow Updates Articles from This Blog via Email

No Comments

Sieve Of Eratosthenes | Mathematics | Data Structures and Algorithm | Python

Problem Statement: The  Sieve of Eratosthenes  is a method for finding all primes up to (and possibly including) a given natural n . n .  Th...