Coder Social home page Coder Social logo

arunk0548's Projects

ballpoolgame icon ballpoolgame

Problem Statement A game of pool is played on a frictionless rectangular table. Imagine that the table is represented by the coordinates (0,0), (0, 142), (284, 142) and (284,0) where the coordinate axes are measured in centimetres. A player places a ball anywhere on the table (but not on the cushions) and hits the ball to a point on one of the cushions. The ball travels at a constant velocity rebounding off the cushions. Write a program that accepts as input from the user, the initial position of the ball, the position of the point at one of the cushions at which the ball makes its first impact, the time the ball travels around the table, and as output, the final position of the ball. Assumptions: ● All collisions with the cushions are perfectly elastic, and there is no spin imparted on the ball i.e. angle of incidence = angle of reflection. ● The ball is a point object ● The table is pocketless ● The cushions have no “thickness” and are represented by the boundaries of the rectangle shown in the diagram above. Note that the diagram is just for visualization purposes only! ● The maximum speed at which the ball can travel is at 1000 cm/s ● If the ball hits the corner, it rebounds “straight back”

codechefs icon codechefs

Gmail, facebook, twitter login integration.

conversionbetweenbases icon conversionbetweenbases

Write a program to convert between bases of any order from 2 to 16. The input should be in base 10. Output should be in the base of the user's choice.

datetowords icon datetowords

Write a program that accepts as input from the user the date in dd-mm-yyyy format. The output should be the date in words. Sample input: Input date: 04-04-1982 Output: Fourth of April, Nineteen Eighty Two

magicsquaregenerator icon magicsquaregenerator

A normal magic square, henceforth referred to as a magic square, is an arrangement of integers from 1 to n2 arranged in an n by n grid. Each number occurs only once, and the sum of the numbers in each row, column or diagonal add up to the same number.

nqueenssolution icon nqueenssolution

N-by-N Queens Problem One of the oldest chess based problems is to place 8 queens on a chessboard without the queens attacking each other. (If you are not familiar with chess, a queen can attack any square on the same row, any square on the same column, or any square on the same diagonal). It is an amusing little exercise to write code to enumerate all solutions. Your task, in this week's challenge is to write code to display A single solution to placing n queens on an n by n chessboard. NOTE that we're looking for only ONE solution and not ALL. The user inputs n, and the output should be a solution of the form Queens on (x1,y1),(x2,y2),...,(xn,yn) where the xi stands for the row number and yi stands for the column number. Example: Enter size of chess board n by n: 8 Output: Queens on (1,1),(7,2),(5,3),(8,4),(2,5),(4,6),(6,7),(3,8) (The solution corresponds to the diagram at the bottom; this is for illustrative purposes only.): Note that n should be in the range 4 to 25 (inclusive).

nstringsorting icon nstringsorting

Sanjay gives you a list of N strings and a task to solve. The task is to remove all the duplicate strings from the list and print the resulting list of strings in a sorted order. Input: The first line contains an integer N. Then next N lines contain a string Si Output: Print the sorted list. Constraints: 1 ≤ |N| ≤ 5000 1 ≤ |Si| ≤ 100

numbertotextconverter icon numbertotextconverter

Problem Statement The user enters an integer between 0 and 1,000,000 inclusive. The output should be the number in words. Example: Input: 14563 Output: Fourteen thousand five hundred and sixty three.

simplices icon simplices

In geometry, a simplex (plural: simplexes or simplices) is a generalization of the notion of a triangle or tetrahedron to arbitrary dimensions. Specifically, a k-simplex is a k-dimensional polytope which is the convex hull of its k + 1 vertices

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.