Question
WAP to generate n lines of the following pattern on the computer screen:

Answer

Get the step-by-step solution for this question inside the Vidyadip app.

Get the answer in the app

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free

Similar questions

Write a function update () to update the record in the binary file “student”, which consist of student number, student name and marks. The updation should be done on the basis of student number entered by the user.
Write a python program using function to accept the list as parameter and print the odd element of the list.
Assuming the given dataset answer the questions given below:

animal age visits priority
a cat 2.5 1 yes
b cat 3.0 3 yes
c snake 0.5 2 No
d dog NaN 3 yes
e dog 5.0 2 No
f cat 2.0 3 No
g snake 4.5 1 No
h cat NaN 1 yes
i dog 7.0 2 No
j dog 3.0 1 No

(a) To create the dataframe from the above dictionary and index is stored in label list.

(b) To display the Data frame.

(c) To calculate the sum of all visits (the total number of visits).

(d) Calculate the mean age for each different animal in df

(e) To Append a new row 'k' to df with your choice of values for each column.

(f) To delete the new entered row.

(g) To count the number of each type of animal in df.

(h) To sort df first by the values in the 'age' in descending order, then by the value in the 'visit' column in ascending order.

(i) To print the maximum values of each column.

(j) To display all the statistics.

(k) To sort the data according the index.

Write a Python program to push all zeros to the end of a given list a. The order of the elements should not change.
Write a program to count no. of records in csv file and display the records in tabular form. Admno, Name, Eng, Hindi, Maths, Sci, Ssc 1101 1102 1103 1104 1105 Tejas Swati Sam Imran Heena 80 90 90 75 85 85 85 80 76 90 95 94 64 80 90 94 96 85 80 75 86 80 70
Write a python program using function to accept a list as parameter and return the sum of all the list elements.
WAP to find the sum of first n terms of the following series:
$1+ x +\frac{x^2}{2 !}+\frac{x^3}{3 !}+\ldots$
Write a python program using function to demonstrate random() along with list, tuple and dictionary. The program should do 3 things: (i) Should create the list of 5 random numbers between 10 to 99. (ii) Should create the tuple of 5 random numbers between 10 to 99. (iii) Should create the dictionary of 5 keys:values random characters as key and ASCII as its value.
Write a program to create the list and ask user whether you want to add new element if say yes then add the element and print the new list else print the entered list.
WAP to find the sum of first n terms of the following series:
$1+\frac{x^3}{3 !}+\frac{x^5}{5 !}+\frac{x^7}{7 !} \ldots$