Skip to content

Alphabet Rangoli (python or cpp only) #102

Open

Description

@ArmanKumar21

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

Different sizes of alphabet rangoli are shown below:

#size 3

----c----
--c-b-c--
c-b-a-b-c
--c-b-c--
----c----

#size 5

--------e--------
------e-d-e------
----e-d-c-d-e----
--e-d-c-b-c-d-e--
e-d-c-b-a-b-c-d-e
--e-d-c-b-c-d-e--
----e-d-c-d-e----
------e-d-e------
--------e--------

#size 10

------------------j------------------
----------------j-i-j----------------
--------------j-i-h-i-j--------------
------------j-i-h-g-h-i-j------------
----------j-i-h-g-f-g-h-i-j----------
--------j-i-h-g-f-e-f-g-h-i-j--------
------j-i-h-g-f-e-d-e-f-g-h-i-j------
----j-i-h-g-f-e-d-c-d-e-f-g-h-i-j----
--j-i-h-g-f-e-d-c-b-c-d-e-f-g-h-i-j--
j-i-h-g-f-e-d-c-b-a-b-c-d-e-f-g-h-i-j
--j-i-h-g-f-e-d-c-b-c-d-e-f-g-h-i-j--
----j-i-h-g-f-e-d-c-d-e-f-g-h-i-j----
------j-i-h-g-f-e-d-e-f-g-h-i-j------
--------j-i-h-g-f-e-f-g-h-i-j--------
----------j-i-h-g-f-g-h-i-j----------
------------j-i-h-g-h-i-j------------
--------------j-i-h-i-j--------------
----------------j-i-j----------------
------------------j------------------
The center of the rangoli has the first alphabet letter a, and the boundary has the alphabet letter (in alphabetical order).

Function Description

Complete the rangoli function in the editor below.

rangoli has the following parameters:

int size: the size of the rangoli
Returns

string: a single string made up of each of the lines of the rangoli separated by a newline character (\n)
Input Format

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

Constraints:
0<size<27

Activity

  1. Abhishek-Vaidya commented on Oct 14, 2022

    @Abhishek-Vaidya
    Contributor

    I can solve this issue most optimally can you assign me this?

  2. Abhishek-Vaidya commented on Oct 14, 2022

    @Abhishek-Vaidya
    Contributor

    I have solved this problem and created the PR please check it.

  3. sangalgovind commented on Oct 14, 2022

    @sangalgovind

    plz assign it to me

  4. MadScientist46290 commented on Oct 16, 2022

    @MadScientist46290
    Contributor

    Can you assign it to me

  5. Abhigitlog commented on Aug 31, 2023

    @Abhigitlog

    Good morning ,
    We are a team of 3 members from St Francis Institute of Technology (Mumbai , Maharashtra).
    For our Resource open source project Lab (ROSPL) , we are interested to work on the given issue.
    Kindly assign this (Alphabet Rangoli) issue to us .
    Thank You.

  6. Abhigitlog commented on Oct 16, 2023

    @Abhigitlog

    I have solved this issue. So , can u assign me and merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions