Questions: 5 831

Answers by our Experts: 5 728

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 integer number

N as input. Write a program to print the right-angled triangular pattern of N rows as shown below.Input

The first line of input is a positive integer.

Explanation

For example, if the given number is

5, the output should be

______

|  /

|  /

| /

| /

|/


make an algorithm using pseudocode and python which will get atm pin code from user. if the pin is "1234" then it should display correct otherwise if the pin is incorrect 3 times it should display account locked



Convert list [""python"", ""is"", ""a"", ""programming"", ""language""] into string"

"python is a programming language""


second Problem


a= "python is a programming language"

expected output:- {"python"=6, "is"=2,a""=1,"programing"=11, "language"=8}


Write an algorithm that will output a maximum of three keyword suggestions after each character is typed by the customer in the search field.

If there are more than three acceptable keywords, return the keywords that are first in alphabetical order, Only return keyword suggestions after the customer has entered two

characters

Keyword suggestions must start with the characters already typed Both the repository and the customerQuery should be compared in a case insensitive way.

Input

The input to the method/function consists of two arguments: repository, a list of unique strings representing the various keywords from the Amazon review comment section; customer Query, a string representing the full search query of the

customer

Output

Retum a list of a list of strings in lower case, where each st represents the keyword suggestions made by the system as the customer types each character of the customerQuery
Create program that requires the user to enter the following data, name, grade in 9 subjects, compute the general weighted average, inform the user if the average pass or fail, ask the user to try again the program Y for yes and will iterate the program value not y displays the message Thank You
Make an algorithm using pseudocode and python which will get ATM pinhole from user, if the pin is 1234 display correct otherwise if the pin is incorrect 3 times display account locked.


W pattern with *

Write a program to print

W pattern of N lines using an asterisk(*) character as shown below.Note: There is a space after each asterisk * character.Input

The first line is an integer

N.Explanation

For

N = 5The output should be



#using python3

# The client Sends All Data to server and then Closes the Connection,

#without expecting reply.

# Using UDP datagrams for communication, then the protocol itself will

#deliver your data in discrete and identifiable chunks.

# Sending data over a stream but delimited as length-prefixed blocks.


import socket, struct

from argparse import ArgumentParser


header_struct = struct.Struct('!I') # messages up to 2**32 - 1 in length

def client(address):

   sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

   sock.connect(address)

   sock.shutdown(socket.SHUT_RD)

   put_block(sock, b'Beautiful is better than ugly.')

   put_block(sock, b'Explicit is better than implicit.')

   put_block(sock, b'Simple is better than complex.')

   put_block(sock, b'')

   sock.close()


Shaded Diamond

Given an integer value 

N as input, write a program to print a shaded diamond of 2*N -1 rows using an asterisk(*) character as shown below.

Note: There is a space after each asterisk (*) character.

Input

The first line of input is an integer 

N.

Explanation

In the given example 

N = 5. Therefore, the output should be

    * 
   * * 
  * * * 
 * * * * 
* * * * * 
 *     *
  *   *
   * *
    *
Sample Input 1
6
Sample Output 1
     * 
    * * 
   * * * 
  * * * * 
 * * * * * 
* * * * * * 
 *       *
  *     *
   *   *
    * *
     *
Sample Input 2
5
Sample Output 2
    * 
   * * 
  * * * 
 * * * * 
* * * * * 
 *     *
  *   *
   * *
    *

Number Diamond

Given an integer 

N as input, write a program to print a number diamond of 2*N -1 rows as shown below.

Note: There is a space after each number.

Input

The first line of input is an integer 

N.

Explanation

In the given example, the number of rows in the diamond is 

5.

So, the output should be

    1 
   1 2 
  1 2 3 
 1 2 3 4 
1 2 3 4 5 
 1 2 3 4 
  1 2 3 
   1 2 
    1
Sample Input 1
5
Sample Output 1
    1 
   1 2 
  1 2 3 
 1 2 3 4 
1 2 3 4 5 
 1 2 3 4 
  1 2 3 
   1 2 
    1
Sample Input 2
4
Sample Output 2
   1 
  1 2 
 1 2 3 
1 2 3 4 
 1 2 3 
  1 2 
   1

LATEST TUTORIALS
APPROVED BY CLIENTS