write a python function Check_Exception(index, *list)(Refer RollNo_W10A_1.py) which accepts an index value to access the list element and a list composed of numbers. Your function should produce the required element while taking care of the following cases via exception handling as shown in the example.
When the given index value is out of range on the input list.
When the index value is not an integer.
When no value is provided.
Write a program to check if a given number is a prime or not
Given an array A (8,8). Find the sum and the number of positive elements, located below the main diagonal the smallest element of the array (minimum).
please help answer
Given an integer N, write a program to print a number diamond of 2*N-1 rows as shown below.
Explanation:
In the given example,the number of rows in the diamond is 4.
So,the output should be
. . . 0 . . .
. . 0 0 0 . .
. 0 0 0 0 0 .
0 0 0 0 0 0 0
. 0 0 0 0 0 .
. . 0 0 0 . .
. . . 0 . . .
Write a program in C# to show percentage of class attended and Is student is allowed to sit in exam or not.
A company is planning to provide an extra discount to its customers. every order has an order I'd associated with it which is a sequence of digits.the discount is calculated as the count of the unique repeating digits in the order I'd.
A company is offering a special discount to its customers based on an algorithm. Two range values are fed to the algorithm and in return t will calculate the discount to offer to the customers. The discount is calculated as the sum of all the prime numbers within the defined range including the range values if the range values are the prime numbers
Write an algorithm to find the special discount given to the customers
Input
The first line of the input consists of
an integer-rangelet remeng
the minimum boundary wabererte
given range finding the p
values)
The Need for Security
Why is coding vital for security? Provide instances where HIPPA, National Security, Bank/Heath industries must have stringent coding practices. Explain why. If possible, provide a small piece of code (Java or Python snippet) that illustrates this.
Given a integer N as a string number and K as input, write a program to print a number pyramid of K rows
Input
The first line of input is an integer N
The second line of input is an integer K
If N=10,K=5
The output should be
10
11 12
13 14 15
16 17 18 19
20 21 22 23 24
Test Data :
Input 5 number of elements in the array :
element - 0 : 2
element - 1 : 5
element - 2 : 7
element - 2 : 3
element - 2 : 10
Expected Output:
The values store into the array are:
2 5 7 3 10
The values store into the array in reverse are :
10 3 7 5 2