Hey guys, Hope you all are doing great. I am back with with a byte of python performance.

I have been playing on codingame.com a lot now a days during my weekends.




Its cool site for the player aka coders who want to try there hands into gaming domain. You have plenty to select from







So stay tuned for the coming new gen puzzles and coding tips to increase your efficiency and performance!!


Hope you find this post useful and interesting. Please let me know your feedback, on how i can improve and make it better. Till then!! Cheers!!
0

Add a comment

Greetings!! Here's a series of Cold Golf problems and solutions in Python as a part of 21 days of Code | Code Golf by Skillenza 

https://skillenza.com/challenge/21days-of-code

DAY - I

A Little Complex

Given n complex numbers each x + yi, where x is the real part and y is the imaginary part, find their product.

Input Format

The first line of input consists of an integer t denoting the number of test cases. t test cases follow.
1

For the need of a simple tabular Grid in your Angular JS application, one of the most basic and simple to use package is angular-ui-grid. The implementation is easy in many of the use cases, but when it comes to extend the limits of the ui-grid, life becomes tough.

One of the tricky task is to set the Grid height as dynamic, in other words to make the grid more flexible to number of rows and the grid size would depend on it.

Hey guys, Hope you all are doing great. 

Algorithm To Convert Post-fix Expression into Infix expression:-

Scan the Post-fix String from Left to Right. If the character is an Operand, then Push it on to the deque. If the character is an Operator, then Pop left Operator 1 and Operand 2 and concatenate them using Infix notation where the Operator is in between the Two Operands. The resultant expression is then pushed on the deque.

Hey guys, Hope you all are doing great.

As the first part of this series of Python package and installation we will cover pip vs Conda

pip vs Conda

pip

Python packages only. Compiles everything from source. Installs binary, wheel, the ones which pypi supply Blessed by the core Python community (i.e., Python 3.4+ includes code that automatically boostraps pip). conda

Python agnostic.

Hey guys,

Hope you all are doing great. I love Code Golfing, what it brings out in you is the hidden concepts of a programming language and especially the push to implement same thing in numerous ways.

Code Golfing and Python - Yeah that's my Poison!

Below are few tips and tricks which will give you an edge over other programmer to write the shortest code:

1. The foo if condition else bar condition can be shortened to

True if condition else False ------- [False,True][condition]

2.

Hey guys, Hope you all are doing great.

I have always found Regular expressions or REGEX quite amazing. You can solve your string related problem in just some simple magic of patterns.

Our brain works very well to identify the pattern in our day to day life. As these are visual clues, we tend to catch and analyse them better. In fact, their you make negligible mistake to tackle the scenario.
1

Hey guys, Hope you all are doing great. I am back with Some Python Programming tips for

CODE GOLF Challenges.

Here are the Second part of code golfing Tips in Python

I prefer Python or Python3 myself for code golfing

So we will discuss dome tips as generics for code golf programming in Python:

7. Use `n` to convert an integer to a string instead of using str(n).

Hey guys, Hope you all are doing great. I am back with Some Python Programming tips for

CODE GOLF Challenges.

So, What is CODE GOLF??

As per Wikipedia, it is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code (not to be confused with binary Sizecoding) that implements a certain algorithm.
12

Hey guys, Hope you all are doing great. I am back with with a byte of python performance.

I have been playing on codingame.com a lot now a days during my weekends.

Its cool site for the player aka coders who want to try there hands into gaming domain.

Hey guys, Hope you all are doing great. I am back with another problem of Project Euler on

Project Euler #11: Largest product in a grid

In the 20×20 grid below, four numbers along a diagonal line have been marked in bold.

Hey guys, Hope you all are doing great.

Today i came across an intruding method, which is not used in generally but is very effective and we encounter its application a lot of .

That's 

Tabibitosan method

Tabibitosan: is a Japanese word which literally means "Pilgrim". This came up when people thought it as a method there you transverse through a consecutive pattern (same as going from temple to temple).
8

Hey guys, 

Hope you all are doing great. I am back with another problem of Project Euler on

The sum of the primes below 10 is 2+3+5+7=17

Find the sum of all the primes not greater than given N.

Input Format

The first line contains an integer T i.e. number of the test cases.

The next T lines will contains an integer N.

Output Format

Print the value corresponding to each test case in separate line.

Hey guys, Hope you all are doing great. I am back with a new domain SQL. So the problem goes like, you need to print prime numbers less than 1000.

Seems easy right!! Just use a for loop check for the list of natural numbers for prime condition whether they are only divisible by 1 and itself.

But if you are asked to do it only using plain SQL, i will be using Oracle in my case, how would you do that.

In PL/SQL its possible with straight approach, but in SQL its bit tricky.Lets start....
13

Hey guys,

Hope you all are doing great. I am back with another problem of Project Euler on

Project Euler #8: Largest product in a series

Find the greatest product of KK consecutive digits in the NN digit number.

Input Format

First line contains TT that denotes the number of test cases.

First line of each test case will contain two integers NN & KK.

Second line of each test case will contain a NN digit integer. 

Output Format

Print the required answer for each test case.

Hey guys,

Hope you all are doing great. I am back with another problem of Project Euler

Project Euler #2: Even Fibonacci numbers

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1,2,3,5,8,13,21,34,55,89,⋯

By considering the terms in the Fibonacci sequence whose values do not exceed N, find the sum of the even-valued terms.

Input Format

First line contains T that denotes the number of test cases.
2

Hey guys, 

Hope you all are doing great. I am back with another problem of Project Euler on

Project Euler #6: Sum square difference

The sum of the squares of the first ten natural numbers is, 12+22+...+102=385. The square of the sum of the first ten natural numbers is, (1+2+⋯+10)2=552=3025. Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025−385=2640.
1

Hey guys, 

Hope you all are doing great. I am back with another problem of Project Euler on

Project Euler #5: Smallest multiple

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.

What is the smallest positive number that is evenly divisible(divisible with no remainder) by all of the numbers from 1 to N?

Input Format

First line contains T that denotes the number of test cases. This is followed by T lines, each containing an integer, N.

Hey guys, 

Hope you all are doing great. I am back with another problem of Project Euler on

Project Euler #3: Largest prime factor

The prime factors of 13195 are 5, 7, 13 and 29.

What is the largest prime factor of a given number N?

Input Format

First line contains T, the number of test cases. This is followed by T lines each containing an integer N.

Output Format

For each test case, display the largest prime factor of N.

Hey Fellas!! So its time to roll on.

Mathematical series are very interesting in there own ways. I find them interesting as they tickles your brain to know more.

That you try to find the end. Counting on your fingers, you will get bored or either get tired.

Programming!! Yeah that's interesting!!

Lets begin this Series on Mathematical Series.
Loading