Blog Feed

Python program, TCS

[TCS TNQT Question] Program to print the difference between the sum of numbers at odd and even indexes of a number

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw 1.ipynb hosted with ❤ by GitHub

OR
AN ALTERNATIVE APPROACH WOULD BE

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw 2.ipynb hosted with ❤ by GitHub
Uncategorized

File Management in Python

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw FILEIO.ipynb hosted with ❤ by GitHub

Python program

Programs pertaining to PRIME numbers (Bonus: Also includes a program on SEXY PRIMES)

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw Prime.ipynb hosted with ❤ by GitHub

Note for a beginner:

All the above functions can be embedded withing a single function and then, the desired function could be called. Using functions for programming makes everything easier since you can always call them once you have created them. This boosts a programmer’s speed and accuracy as the code becomes clear and hence, easier to debug. Moreover, it saves time since you don’t have to rewrite large blocks of code.

Uncategorized

Basic Level problems in Python

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

These are some basic level problems that can be done by creating functions

Fibonacci Series, Python program

Python Program to print Fibonacci Series up to a certain element

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw FIBONACCI.ipynb hosted with ❤ by GitHub