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
elena-s [515]
4 years ago
15

Write some code that counts the number of times the value associated with student_id appears in the list associated with incompl

etes and assigns this value to number_of_incompletes. You may use, if you wish, an additional variable, k.
Computers and Technology
1 answer:
mafiozo [28]4 years ago
6 0

Explanation:

incompletes = [1,2,1,5,3,4,5,6,5,1,7]

student_id = 5

number_of_incompletes = 0

for k in incompletes:

  if(k == student_id):

      number_of_incompletes += 1

print("No. of incompletes = ",number_of_incompletes)

In this program, "incompletes" is a variable where set of values are associated. "student_id" holds the value to be searched in the list. So the counter "number_of_incompletes" is set to 0 and it will be incremented in the for loop if the student id matches. Finally the number of incomplete gets printed.

Here the student_id is "hard-coded". If you want you get the input from the user too.

You might be interested in
Difference between entropy and enthalpy is
olchik [2.2K]

Answer:

Explanation:

Enthalpy is the measure of total heat present in the thermodynamic system where the pressure is constant. Entropy is the measure of disorder in a thermodynamic system.

3 0
3 years ago
Briefly explain the difference between modulating and encoding?
siniylev [52]

Answer:

Encoding is the process in which the digital or analog data are converted into digital signal. Encoding are used for efficient transmission and storage purpose by putting in the form of sequence of various number and characters.

There are basically three types of encoding:

  • Semantic encoding
  • Visual encoding
  • Acoustic encoding

Modulating is the process of encoding the information in a transmitted signal and converting the digital or analog data into analog signals. It is widely used in long distance communication. In modulating process, modulator is the device that are capable of modulating carrier signal.  

8 0
4 years ago
Which Boolean operator produces the result 1 only if both values are 1? Which Boolean operator produces the result 0 only if bot
lorasvet [3.4K]

Blank 1 is AND

Blank 2 is OR

5 0
3 years ago
What kind of network connection do you think is used to connect most wireless video game controllers to consoles, and why would
Ostrovityanka [42]

Answer:

I would say Lan

Explanation:

5 0
3 years ago
It is a group of two or more computer system connect to each other​
Sedbober [7]

network is a group of two or more computer system connected together

8 0
3 years ago
Other questions:
  • In an era of widespread cultural change within the United States,
    11·1 answer
  • What feature did the 32X add to the Sega Genesis?
    13·1 answer
  • What is the subjects under artificial intelligence ?​
    15·1 answer
  • Most colleges require blank years of foriegn language for admission
    9·1 answer
  • When backing up a database server to LTO tape drives, the following schedule is used. Backups take one hour to complete.
    12·1 answer
  • Emilio is reviewing the data he collected from historical records about immigration in the united states. He decides to create a
    5·1 answer
  • (k + 3)by the power of 3​
    9·1 answer
  • You started using a new Windows server three months ago. Since that time, you have found that the system slows down and crashes
    12·1 answer
  • Does CLAIRE https://claire-ai.org/vision/ considered a representative of Roy Rotwell's Fifth Generation of innovation?
    7·1 answer
  • From Edmentum/Plato
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!