_Given an integer number
The first line of input is a positive integer.
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}
W pattern with *
Write a program to print
The first line is an integer
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