Answer:
Option B is the correct answer.
Explanation:
- In the above code, the loop will execute only one time because the loop condition is false and it is the Do-While loop and the property of the Do-while loop is to execute on a single time if the loop condition is false.
- Then the statement "x*=20;" will execute one and gives the result 200 for x variable because this statement means "x=x*20".
- SO the 200 is the answer for the X variable which is described above and it is stated from option B. Hence it is the correct option while the other is not because--
- Option A states that the value is 10 but the value is 200.
- Option C states that this is an infinite loop but the loop is executed one time.
- Option D states that the loop will not be executed but the loop is executed one time
I'm sure you have heard of social media, But have you heard it start's to get out of hands because kids get addicted?
1)Causes kids to be addicted
Answer:
Python Code:-
#creating a list
current_members = [4, 6, 9]
#defining the variable
#assigning the value
member_id = 9
#defining variable count
count = 0
#defining the variable and setting initial value to true
is_a_member = False
#for loop is used to iterate over the list
for x in current_members:
#if statement will check whether the element is found
if x == member_id:
#set the value to true if the value is matched
is_a_member = True
#set the value to 1
count = 1
#if count == 0
#set the value of is_a_member variable to false
if count == 0:
is_a_member = False
#print the current value stored in is_a_member variable
print(is_a_member)
Explanation:
In the above python program, a list is created that is "current_members" and some values are inserted. In the next line, a three-variable is defined that are member_id, count, and is_a_member.
- In both variable member_id, count assigns some value. and in is_a_member variable assign a False value.
- Using a for loop to iterate over the list.
- Inside the loop, If the statement will check whether the element is found. Then set the value of is_a_member variable to True and count to 1.
- Another if the statement is used which checks the value of the count variable. If the value of count is 0 then set the value of is_a_member to False.
- print() function is used to display the current value of is_a_member variable.
Answer:
1. Formula is A2 : A9 = COUNT( A2: A9 ) = 8
2. Formula is SUM( A2: A9 ) = 36
3. Formula is B2 : B9 = COUNT( B2: B9) = 8
4. Formula is MAX( C2: C9) = 5
5. Formula is MIN( C4: C8) = 3
6. Formula is SUM( C5 - C6) = 0
7. Formula is AVERAGE( C2: C9) = 4
Explanation: Have a nice day!✌️