Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Latest commit

 

History

History
55 lines (35 loc) · 1.83 KB

README.md

File metadata and controls

55 lines (35 loc) · 1.83 KB

PyCBIT - Hackathon.init() - March 2018

Rules for submitting

  1. To submit your code fork the repo to your profile, push the code and then put up a pull request.
  2. Completion of either one set fully or two questions from each set will be the minimum requirement for qualification.
  3. All the submissions after 11:59PM March 18th will not be considered.
  4. The file name should start with the question number followed by "_" and the desired name.(example : 1_sum_57, 2_room_percent_increase)

Set 1

  1. Print the sum of numbers less than 500 which are divisible by 5 and not divisible by 7
  2. Consider a room with dimension 6X8X10, Write a program to compute the area of the room if the dimensions are increased by 15 percent.
  3. Sort the given words alphabetically and concat them with the second set.

List Items 1

  • Ron
  • Hermione
  • Harry
  • Professor
  • Dobby

List Items 2

  • The House Elf
  • Potter
  • Granger
  • Lockhart
  • Weasley

Set 2

  1. Special Pythagorean triplet A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a^2^ + b^2^ = c^2^ For example, 3^2^ + 4^2^ = 9 + 16 = 25 = 5^2^. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc.

  2. 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. Write a program to find the smallest number that can be divided by all the numbers from 1 to 20 without leaving a remainder.

  3. Print all the prime numbers between 1 and 99999

  4. Ask the user for a string and print out whether this string is a palindrome or not. A palindrome is a string that reads the same forwards and backwards.

Set 3

  1. Create a binary tree class. Overload the ‘+’ operator to behave as an node insertion, ‘-‘ operator to behave as a node deletion. This should be strictly written in Python.