Armstrong number between two intervals
combined right angled triangles pattern:
you are given n. print n rows starting from 1 after combining two inverted-right-angled triangles pattern as shown in the output of the given example
explanation : 1st inverted right angled triangle pattern
1 2 3 4
5 6 7
8 9
10
2nd inverted right angled triangle pattern
17 18 19 20
14 15 16
12 13
11
combined pattern
1 2 3 4 17 18 19 20
5 6 7 14 15 16
8 9 12 13
10 11
input : n=4
output:
1 2 3 4 17 18 19 20
5 6 7 14 15 16
8 9 12 13
10 11
input: 5
output:
1 2 3 4 5 26 27 28 29 30
6 7 8 9 22 23 24 25
10 11 12 19 20 21
13 14 17 18
15 16
2 6 3 1 8 12 2 9 10 3 4
find mean,median,mode
how would one say a number is closer to another number than a another number if u know what I mean
Like say we have...
X
We wanna see if
X
Is closer to y
Or closer to w
Given an integer input 1 and input 2 prime encoder function returns an integer array
Three letters are selected at random from the 8 letters of the word COMPUTER, without regard
to order.a. Find the number of possible selections of 3 letters.
b. Find the number of selections of 3 letters with the letter P.
c. Find the number of selections of 3 letters where the 3 letters form the word TOP
A class consists of 3 students from Ashville and 4 from Bewton. A committee of 5 students is
chosen at random the class.a. Find the number of committees that include 2 students from Ashville and 3 from Bewton
are chosen.
b. In fact 2 students, from Ashville and 3 from Bewton are chosen. In order to watch a video,
all 5 committee members sit in a row. In how many different orders can they sit if no two
students from Bewton sit next to each other.
By both generating and directly computing obtain the number of the following:
a. All permutations of (0,1,2,3,4,5).
b. All permutations of ("A","B","C").
c. Permutations of size 3 of (0,1,2,3,4,5).
d. Permutations of size 2 of (0,1,2,3,4,5,6).
e. Combinations of size 3 of (0,1,2,3,4,5).
f. Combinations of size 2 of (0,1,2,3,4,5).
g. Combinations of size 5 of (0,1,2,3,4,5)
Write down a python code to generate 3 sets of lottery tickets randomly from the pool of 300
tickets with an equal probability distribution, and keep in mind that if a set of the number already
selected in the first-month lottery, the same number is not allowed to repeat.
Right Triangle
Given a number N write a program to print a triangular pattern of N lines with the number as shown below
1
121
12321
1234321