It loses power and most likely stops working
Answer:
465 ways
Explanation:
Atleast 1 girl and 1 boy
Possible combinations :
1 girl ; 3 boys = 6C1 ; 6C3
2 girls ; 2 boys = 6C2 ; 6C2
3 girls ; 1 boy = 6C3 ; 6C1
(6C1 * 6C3) + (6C2 * 6C2) + (6C3 * 6C1)
Combination formula:
nCr = n! ÷ (n-r)!r!
We can also use a calculator :
6C1 = 6
6C3 = 20
6C2 = 15
Hence,
(6C1 * 6C3) + (6C2 * 6C2) + (6C3 * 6C1)
(6 * 20) + (15 * 15) + (20 * 6)
120 + 225 + 120
= 465 ways
Answer:
Explanation:
pop(): Remove an item from the end of an array
push(): Add items to the end of an array
shift(): Remove an item from the beginning of an array
unshift(): Add items to the beginning of an array
Answer:
The solution code is written in Python 3
- count = 0
- sum = 0
-
- num = input("Enter a number: ")
-
- while(num != ''):
- sum += float(num)
- count += 1
- num = input("Enter a number: ")
-
- print("Sum : " + str(sum))
- print("Average: " + str(sum / count))
Explanation:
Firstly, we declare two variables count and sum to hold the number of input number and the total of the input number, respectively (Line 1-2)
Next, we prompt user to input the first number (Line 4). While the num is not ' ' (This means it is not "Enter" key), accumulate the num to sum variable and increment count by one (Line 6-8) and then prompt the user to input the next number (Line 9).
At the end, display the sum and average using print function (Line 11 -12).