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

The Ministry of Home Affairs and Immigration would like to introduce an automated id number and passport generation system. The system takes into consideration the following:

  • To generate the id number it takes two last digits from the Year of birth, two digits for the month of birth plus two digits for the date of birth, then finally adds a five-digit postfix number.
  • To generate the passport is similar, the system takes the first part from the id number with the year, month and date then it adds the "P-NAM" prefix and finally adds the last two digits from the id number's five-digit postfix number

Your task is to create a program that can achieve the above requirements to assist the ministry automate it’s operations

Input

Input is a single line with the person's first name, date of birth(format YYYY-MM-DD) and five-digit postfix through keyboard input, all separated by single spaces


write a function to add any number of numbers for Eg. add(1,2) add(1,2,3) add(1,2,3,4,5)


How to reverse a string in a given sentence. a. Example: Given string is “ Ram is learning in CCBP Intensive course”. Reverse the word “learning” in the above sentence


import numpy as np

def matrix(m,n):

list1 = []

list2 = []

for i in range(m*n):

inputs = int(input('Enter numbers on intended matrix here: '))

list1.append(inputs)

for i in range(m*n):

order_input = min(list1)

list1.remove(order_input)

list2.append(order_input)

matrix1 = np.array(list2)

matrix2 = matrix1.reshape(m,n)

print(matrix2)

matrix(2,3)




Recreate the pokemon table using Colum by column on the documentation:

Column by column

you can add data one column at a times as well. To do this you use the add_column method, which takes who arguments-a string which is the name for the field the column you are adding corresponds to, and a list or tuple which contains the column data:


x.add_column( "City name",

["Adelaide", "Brisbane", "Darwin", "Hobart", "Sydney", "Melbourne", "Perth", ])

x.add_column("Area", [ 1295,5905, 112, 1357, 2058, 1566, 5386])

x.add_column("Population", [ 1158259, 18557594, 120900, 205556, 4336374, 3306092, 1554769])

x.add_column("Annual Rainfall"[600.5, 1146.4, 1714.7, 619.5, 1214.8, 646.9,

869.4])


Recreate the pokemon table using All rows at once on the documentation:

All rows at once

When you have a list of rows, you can add them in one go with add-row:

x.field_names = [ "City name", "Area", "Population", "Annual Rainfall"]

x.add_row(

[

["Adelaide", 1295, 1158259, 600.5],

["Brisbane'', 5905, 1857594, 1146, 4],

[ "Darwin", 112, 120900, 1714, 7],

["Hobart", 135, 20556, 619.5],

["Sydney", 2058, 4336374, 1214.8],

["Melbourne", 1566, 3806092, 646.9],

["Penth", 5386, 1554769, 869.4],

]

)


Create a program to develop a Regex that will find all website URLS that begin with http://www or https://www search for URL matches and then copy matches back to the clipboard. Display the matches on the screen and display the message “No web addresses found” if there are none.

Given an M x N matrix find all anti-diagonal elements of the matrix..

input :

the first input will contain values of M, N with separated by spaces..

the second line will contain matrix with M x N dimensions

i.e. input is

4 4

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16


output:

1

2 5

3 6 9

4 7 10 13

8 11 14

12 15

16



The Airplane always needs to check with the Airport to see if it has an

available runway before it's able to take off or land. Simulate the above-

mentioned scenario using multi-threading. IN python



MT_ACT1: Object Basics


INSTRUCTIONS


1. Define a class bicycle

2. Properties: brand, model, year, description, weight_kg

3. Methods: name, weight_lbs, set_weight_lbs

  Description:

name - take brand, model and year and put them in a string to output the name of each instance of the bicycle.

weight_lbs - convert from kilogram into pounds. 1kg = 2.2046226218 pounds

set_weight_lbs - is going to be a way that we can pass in a weight, in pounds, and have it converted into kilograms and stored in weight_kg. So you'll be able to set the weight, either by kilograms, or by pounds.

4. Instantiate 2 objects

5. Set and read properties

6. Call all methods


LATEST TUTORIALS
APPROVED BY CLIENTS