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
Vinvika [58]
3 years ago
12

Write an expression using membership operators that prints "Special number" if special_num is one of the special numbers stored

in the list special_list = [-99, 0, or 44]. Sample output with input: 17
Computers and Technology
1 answer:
Maru [420]3 years ago
8 0

Answer:  

   Following are the program in Python language

special_list= [-99, 0, 44] # as mention in the question  

special_num = int(input()) # taking the user input..  

if special_num not in special_list: # checking the condition  

   print('not Special number') #display message  

else:

   print('special number') #display message  

Output:

523

not Special number

-99

special number

Explanation:

   Following are the description of the program.

  • Declared an array special_list and store integer value.
  • Read the integer value by using input function and store them into special_num variable.
  • Check the condition if number exits in array it print special number otherwise not Special number.
You might be interested in
Meaning of mesh topology​
Pachacha [2.7K]

The meaning of mesh topology​ is that it is a type of networking that is made up of the fact that all its nodes do work together to share data amongst each other.

<h3>What is meant by mesh topology?</h3>

Mesh topology is a kind of networking that is said to be where the full nodes do act in a form of a cooperation  so that they can be able to share or distribute data among themselves.

Note that this topology was said to be first seen or developed in about an approximate of about 30+ years ago and it is one that is often used in military applications and now it is seen to be used in home automation, smart HVAC control, and others.

Hence, The meaning of mesh topology​ is that it is a type of networking that is made up of the fact that all its nodes do work together to share data amongst each other.

Learn more about mesh topology​ from

brainly.com/question/14879489

#SPJ1

6 0
1 year ago
What is DAP? How LDAP is different from DAP?
lions [1.4K]

Answer: DAP stands for directory access protocol .It is a protocol that is used for accessing the information from the directory of X.500 protocol.

LDAP(Lightweight directory access protocol) is the software protocol that is present for the simplification process of the X.500 protocol and to make it light-weighted .It is basically a version of DAP in a lightweight form.

8 0
3 years ago
Determine the number of character comparisons made by the brute-force algorithm in searching for the pattern GANDHI in the text
leonid [27]

Answer:

Total number of character comparison = 43

Explanation:

Using the Brute force algorithm

The string of n characters is known as text, and the string of m characters is known as the pattern.

From the given information:

The text (n)=THERE_IS_MORE_TO_LIFE_THAN_INCREASING_ITS_SPEED

The pattern (m) = GANDHI

The total no of characters that we have in the text = 47

The total number of characters in pattern = 6

For a brute force algorithm;

Since; the first character of the pattern does not exist in the text, then the number of trials made can be attempted can be expressed as = n – m + 1

= 47 – 6 + 1

= 47 – 5

= 42

Thus; the algorithm will attempt the trial 42 times.

Now, for loop in the algorithm to run 42 times, the G in the pattern will have to align against the for T in the text, and in the last case, it will be aligned against the last space.

On each attempted trial, the algorithm will make one unsuccessful comparison.

However, at the trial at which the G in the pattern Is aligned with the G in the text, there will be two successful comparisons.

Hence, we can calculate the total number of character comparison as follows:

Total number of character comparison = \mathbf{\bigg ( ( 42 -  (no. \ of \  failed \ comparison) ) \times 1 + (1 \times ( Two \ successful \  comparisons) ) \bigg ) }

Total number of character comparison = ( (( 42 – 1) × 1 ) + ( 1 × 2) )

Total number of character comparison = 41 + 2

Total number of character comparison = 43

3 0
3 years ago
Assume that you have 22 slices of pizza and 7 friends that are going to share it (you've already eaten). There's been some argum
xz_007 [3.2K]

Answer:

In Python:

numberOfWholeSlices = int(22/7)

print(numberOfWholeSlices )

Explanation:

For each friend to get a whole number of slices, we need to make use of the int function to get the integer result when the number of slices is divided by the number of people.

So, the number of slice is: 22/7

In python, the expression when assigned to numberOfWholeSlices  is:

numberOfWholeSlices = int(22/7)

Next, is to print the calculated number of slices

print(numberOfWholeSlices )

4 0
3 years ago
Search the link <br><br> gKuJXd3zYDc<br><br> Subscribe I have a vid premiering soon
lawyer [7]
I will hope this helps :p
5 0
2 years ago
Other questions:
  • Have you ever used a device that relies solely on the cloud?
    10·1 answer
  • What is the lowest and highest address of a 2^20 byte memory, if it is byte readable.
    11·1 answer
  • Jessica has a balance of $2,200 on her credit card with an 18% interest rate. Her credit card company doesn’t require a minimum
    15·1 answer
  • Once a graph has been created, you would need to start over to make any changes to it?
    5·1 answer
  • _____ can render data useless to unauthorized users who might have violated some of the database security layers.
    7·1 answer
  • Question 2 (5 points)
    12·1 answer
  • (20points)
    6·1 answer
  • Difference between switch and switch lite
    10·1 answer
  • What color pixels are used in a camera?
    10·2 answers
  • The residual volume can be measured directly with: Select an answer and submit. For keyboard navigation, use the up/down arrow k
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!