1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Yuliya22 [10]
4 years ago
15

Given:

Computers and Technology
1 answer:
777dan777 [17]4 years ago
6 0

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.
You might be interested in
Mrs. Ferrar is an older woman with a limited income. Which programs and services may assist her with obtaining healthy meals and
Kitty [74]

The programs and services that may assist her with obtaining healthy meals and becoming more physically active are:

1. food stamps or SNAP

2. food banks

5. community parks

6. community gardens

<h3>What are food stamps?</h3>

A food stamps is known to be a kind of voucher that is often issued very cheap by the state for low income and it is often exchangeable for food.

Note that The programs and services that may assist her with obtaining healthy meals and becoming more physically active are:

1. food stamps or SNAP

2. food banks

5. community parks

6. community gardens

See options below

food stamps or SNAP

food banks

WIC

NSLP

community parks

community gardens

Learn more about food stamps from

brainly.com/question/1085704

#SPJ12

5 0
2 years ago
Why is weather forecast so important for hang gliders?
professor190 [17]
Well, it wouldn't be such a good idea if they got caught up in a storm, would it? :p

Strong winds could blow them off-course, or even lightning has a chance of striking the hand glider, causing damage to the glider, the person, or even both.

Additionally, a weather forecast can help in my generic situations. For example, knowing whether to wrap up warm for cold weather, or wear something a bit more loose and breathable for hot weather.
6 0
4 years ago
Which tool is a GUI used to build PowerShell scripts?
enyata [817]

A will be your answer!!! I’m pretty sure

8 0
4 years ago
What could prevent earmuffs from providing your ears good protection from noise?
uranmaximum [27]
Well for one thing, ear muffs were made to keep your ears warm, not protection from noise.
3 0
4 years ago
ASAP 20 Points please hurry
inna [77]

Answer:

All you got to do is type System.out printIn("Study English) etc...

Explanation:

Look at the answer to see if it is right.

7 0
4 years ago
Other questions:
  • An outdoor products company wants to test a new website design where customers can get information about their favorite outdoor
    6·1 answer
  • Inserting diagrams into documents can help readers better understand document text. True or False?
    10·1 answer
  • What is the importance of personal computers in connecting to the internet ?
    13·2 answers
  • To improve at keyboarding, it is a good idea to master frequently typed words.
    14·2 answers
  • Write a method that accepts a number of seconds and prints the correct number of hours, minutes, and seconds.
    9·1 answer
  • Three Cat 5e cables were run from an office area to three computers in a machine shop. Work took place on the weekend when the m
    14·1 answer
  • It is a group of two or more computer system connect to each other​
    7·1 answer
  • Fill in the blank with the correct response.<br> A _<br> is an unknown network.
    12·1 answer
  • Which federal legislation requires lending companies to notify consumers of changes in rates and fees?
    12·1 answer
  • What is the most used gaming keyboard in 2022?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!