As a newbie programmer
As a newbie programmer

As a newbie programmer

Sharing entry level codes. My snippets on GitHub https://github.com/locharp/code-snippets

The Floating circle @ Dcoder

Title: The Floating circle Problem: Cody is a student in Trumph Academy, He is preparing for SSC, while he was solving some problems, he found an easy problem of Circles. The problem is You have to calculate the area of a Circle, radius of the circle...

Lochard 1 minute read 27 May 2023 0 comments $0.02

Reverse The Linked list @ Dcoder

Problem: You are given a linked list, you just need to reverse its order without changing any pointer, ie print the tail first and head last. Input: Input contains elements of linked list separated by space and terminated by -1 Output: Print reversed...

Lochard 1 minute read 26 May 2023 0 comments $0.00

Find the eldest brother! @ Dcoder

Problem: There are 5 brothers in a family, you need to tell eldest brother's age. You are given age of all the brothers. Input: Input contains 5 numbers separated by space indicating the ages of 5 brothers. Output: Print the age of eldest brother. Co...

Lochard 1 minute read 25 May 2023 0 comments $0.00

Tracy's love. @ Dcoder

Problem: Hey, my name is Tracy.I am 4 year old and love the number 6.I want to play a number game with you, I'll give you two numbers and you just need to tell whether their sum or difference can be the number I love,6. Input: Input contains 2 intege...

Lochard 1 minute read 24 May 2023 0 comments $0.01

Equable Triangles @ Dcoder

Title: Equable Triangles Problem: An Equable Triangle is a triangle which has its area equals to the sum of its sides.  You are given with the sides of a triangle, your task is to write a code which will return 'True'. if the triangle is equable, oth...

Lochard 1 minute read 23 May 2023 0 comments $0.01

Tables @ Dcoder

Problem: Cody is now in 1st standard, he is learning tables. Help him printing table of n.  Input: Input containts n, an integer. Output: Print Table of n. Constraints: 1≤n≤10000 Sample Input: 2 Sample Output:  2 4 6 8 10 12 14 16 18 20 n = int(input...

Lochard 1 minute read 22 May 2023 0 comments $0.00

Help Cody @ Dcoder

Title: Help Cody Problem: Cody is stuck in a problem and needs your help to get out of trouble. He was given a sorted array by his teacher. After his teacher left, he mistakenly rearranged some elements of the array. Help Cody sort the array before h...

Lochard 1 minute read 20 May 2023 0 comments $0.02

The Armstrong Number @ Dcoder

Problem: An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example, consider the number 371. The sum of the cube of its digits is 3^3 + 7^3 + 1^3 = 27 + 343 + 1 = 371. Th...

Lochard 1 minute read 18 May 2023 0 comments $0.01

Total Expenses @ Dcoder

Problem: Joey went for shopping. The shopkeeper gives a discount of 10% if the total expense exceeds 1000 . Given total expense as input, write a program to calculate the total money Joey has to give to the shopkeeper after the discount, if discount...

Lochard 1 minute read 17 May 2023 0 comments $0.03

Buy The Bundle @ Dcoder

Problem: Jimmy wants to buy books for N students. He went to the bookshop to buy a bundle of books, each bundle has a different number of books. He wants to buy such a bundle that contains the number of books, which can be distributed equally amongst...

Lochard 1 minute read 16 May 2023 0 comments $0.01