Karthikeya Boyini has Published 2675 Articles

Python program to check if there are K consecutive 1’s in a binary number?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

201 Views

First we take a user input string with the combination of 1’s and 0’s.then create a new string with 1’s, then check if there is any p number of consecutive 1’s is present or not. If present then display FOUND otherwise NOTFOUND. Example Binary number ::1111001111 Enter consecutive 1’s ... Read More

Python program to iterate over multiple lists simultaneously?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

194 Views

Here we use .zip() for iterative over multiple lists simultaneously.zip() takes n number of iterables and returns list of tuples. i-th element of the tuple is created using the ith element from each of the iterables. Example L1=[1, 2, 3, 4] L2=[‘aa’, ’bb’, ’cc’, ’dd’] L=zip(L1, L2) Output [(1, ... Read More

Differences between C++ and C#

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

233 Views

C++ is a statically typed, compiled, general-purpose, case-sensitive, free-form programming language that supports procedural, object-oriented, and generic programming. C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. C# is a simple, modern, general-purpose, object-oriented programming language developed by Microsoft within ... Read More

Python program to communicate between parent and child process using the pipe.

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

644 Views

Using fork is the easiest way to create child process.fork () is part of the os standard Python library. Here, we solve this task by using of pipe(). For passing information from one process to another pipe() is used. For two way communication two pipes can be use, one for ... Read More

rewind() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

71 Views

The rewind() function rewinds a file pointer. It moves it to the beginning of the file. It returns True on success or False on failure. Syntax rewind(file_pointer) Parameters file_pointer − It must point to a file opened by fopen() Return The rewind() function returns True on ... Read More

Read and Write to an excel file using Python openpyxl module

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

4K+ Views

Python provides openpyxl module for operating with Excel files. How to create Excel files, how to write, read etc. can be implemented by this module. For installing openpyxl module, we can write this command in command prompt pip install openpyxl If we want to give a sheet title ... Read More

Python program to cyclically rotate an array by one

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

1K+ Views

Given a user input array. Our task is to rotate cyclically means clockwise rotate the value. Example Input: A=[1, 2, 3, 4, 5] Output=[5, 1, 2, 3, 4] Algorithm Step 1: input array element. Step 2: Store the last element in a variable say x. Step 3: ... Read More

Python program to print all distinct elements of a given integer array.

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

850 Views

Given an integer array. The elements of the array may be duplicate.Our task is to display the distinct values. Example Input::A=[1, 2, 3, 4, 2, 3, 5, 6] Output [1, 2, 3, 4, 5, 6] Algorithm Step 1: input Array element. Step 2: Then pick all ... Read More

tmpfile()function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

29 Views

The tmpfile() function creates a unique temporary file. It returns file pointer for the new file or FALSE on failure. Syntax tmpfile() Parameters NA Return The tmpfile() function returns file pointer for the new file or FALSE on failure. Example Live Demo ... Read More

Instruction type LDA a16 in 8085 Microprocessor

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:23

13K+ Views

In 8085 Instruction set, LDA is a mnemonic that stands for LoaD Accumulator with the contents from memory. In this instructionAccumulatorwill get initialized with 8-bit content from the 16-bit memory address as indicated in the instruction as a16. This instruction uses absolute addressing for specifying the data. It occupies 3-Bytes ... Read More

Advertisements