Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Given an array arr[] sorted in ascending order of size N and an integer K. Check if K is present in the array or not. (Use Binary Search) Input: N = 5 K = 6 arr[] = {1,2,3,4,6} Output: 1

Explanation: Since, 6 is present in the array at index 4 (0-based indexing), output is 1


Given an array arr[] sorted in ascending order of size N and an integer K. Check if K is present in the array or not. (Use Binary Search) Input: N = 5 K = 6 arr[] = {1,2,3,4,6} Output: 1

Explanation: Since, 6 is present in the array at index 4 (0-based indexing), output is 1


Please correct the error. There are syntax errors, logical errors and runtime errors.

1.

if x == y:
    print('Equal')

2.


x = 'hello'
y = ['hello']


if x == y:
    print('Equal')

3.


x = True


while x:
    for x in list(range(0,10)):
        print(x)

4.

myfunction(x, y):
    return x + y


    else:
        print("Hello!")


    if mark >= 50
        print("You passed!")


    if arriving:
        print("Hi!")
    esle:
        print("Bye!")


    if flag:
    print("Flag is set!")


Thank you for the help!


Given an array arr[] sorted in ascending order of size N and an integer K. Check if K is present in the array or not. (Use Binary Search) Input: N = 5 K = 6 arr[] = {1,2,3,4,6} Output: 1

Explanation: Since, 6 is present in the array at index 4 (0-based indexing), output is 1


Given an array arr[] sorted in ascending order of size N and an integer K. Check if K is present in the array or not. (Use Binary Search) Input: N = 5 K = 6 arr[] = {1,2,3,4,6} Output: 1

Explanation: Since, 6 is present in the array at index 4 (0-based indexing), output is 1


Create a dataframe by using the dataset [TITANIC.csv] and perform the following operations

i) Print the value of ‘PassengerId’ when the value of Fare is maximum and minimum.

ii) Retrieve all the rows from dataframe when the value of age of the traveller is lies between 40 and 50.

iii) Retrieve the names and gender of all the persons who was survived after the ship fell into the sea.

iv) Select and display last 10 rows from the dataframe when Fare is more than 100 and less than 200’

v) Create the newdataframe(ndf) from original dataframe(df) containing all rows and the following columns [name, ticket,’Fare]. Sort and display all values of column Name in descending order


SOLVE THIS USING PYTHON


2 Problem description In this labwork you are expected to implement a program that builds a computer for different purposes using Template Method pattern. Your program needs to able to build two types of computers which is Gaming and Office. CPU, Memory and type of storage depends on the computer type. For a gaming computer you need to put: ∗ High-end multi-core cpu ∗ High-clock speed memory ∗ SSD storage For an office computer you need to put: ∗ Low-end dual-core cpu ∗ Energy-efficient memory ∗ Energy-efficient HDD However, way you build a computer is a set of pre-determined steps: ∗ Plug CPU ∗ Plug Memory ∗ Plug Storage ∗ Plug peripherals (which are common for both type of computer)

3 Measure of success You are expected to implement necessary classes for this example using Template Method Pattern.


Create your own NetworkServer and NetworkClient applications as following.we will name them as MyComputerServer and MyComputingClient .The Client send two numbers and the server send back addition of the two numbers


Write a program that reads the numbers and sorts them by using the Counting Sort algorithm and finally search a number from that array using Linear Search Algorithm.

Input: 3 6 5 4 7 8 9

 Search Item: 7

Output: Sorted Array: 3 4 5 6 7 8 9

 Search item 7 is found.


With the help panda library create a dataframe using the concept of





dictionary of lists where Keys and Values of dictionary take the data as






LATEST TUTORIALS
APPROVED BY CLIENTS