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
zzz [600]
3 years ago
7

Variable index has a value of 4, and variable accessValid has a value of False. What value does variable, accessPoints, have aft

er the if is executed?
accessPoints = 0
if ((index >=2) or accessValid):
accessPoints += 10
else:
accessPoints = 1
Computers and Technology
1 answer:
snow_lady [41]3 years ago
8 0

Answer:

10

Explanation:

If index is greater than or equal to 2, accessPoints will increase by 10 even if accessValid is false because the if statement states that if index is greater than or equal to 2 OR accessValid is true. The if statement gets executed if either expression is true, and index is greater than 2 because index has a value of 4.

You might be interested in
What internal commands can we use when in interactive mode? can we use CLS and CD?
krok68 [10]
The cd command, also known as chdir (change directory), is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files.
3 0
2 years ago
Write a Python program called wdcount.py which uses a dictionary to count the number of occurrences of each word (ignoring case)
Art [367]

The program is an illustration of loops.

<h3>What are loops?</h3>

Loops are program statements used to perform repetition

<h3>The wordcount.py program</h3>

The program written in Python, where comments are used to explain each line is as follows

# This opens the file in read mode

text = open("myFile.txt", "r")

# This creates an empty dictionary

d = dict()

#This iterates through the text

for line in text:

# This splits the line into words, after removing leading & trailing spaces, and newline characters

words = line.strip().lower().split(" ")

# This iterates through all the words

for word in words:

 # The following if condition counts the occurrence of each word

 if word in d:

  d[word] = d[word] + 1

 else:

  d[word] = 1

#This prints the words and their frequencies, in descending order

for w in sorted(d, key=d.get, reverse=True):

   print(w, d[w])

Read more about loops at:

brainly.com/question/16397886

5 0
2 years ago
I need to code a simple racing game in c++. Help, please. ​
QveST [7]
Can you attach what you have so far
8 0
2 years ago
Program ____ let programmers write code using a word processing-like interface.​
kati45 [8]
<span>Program "editor" </span>let programmers write code using a word processing-like interface.​

This is utilized by programming software engineers; gives them a chance to compose code utilizing a word processing like interface that usually includes functions, like, AutoCorrect and AutoComplete.it is also called text editor.
3 0
3 years ago
I need help making a rap song of my own !! Ty
Veronika [31]
What are u making it about?
6 0
3 years ago
Read 2 more answers
Other questions:
  • _______ refers to the poitically, religiously, or ideologically motivated use of computers (or related technology) by an individ
    15·1 answer
  • Antiglare screens are sometimes called ____.
    7·1 answer
  • What portable computing devices, designed for user convenience, have a sensor called an accelerometer that senses vibrations and
    10·1 answer
  • Create a view named product_summary. This view should return summary information about each product. Each row should include pro
    13·1 answer
  • Write a program that reads two fractions such as 1/2 and 1/4 and computes and stores the sum, the difference, the product and th
    15·1 answer
  • Amy just added a 462 meter run of fiber optic cable to the network what should she do next?
    10·1 answer
  • Which Python expression results in 49?<br><br> 7 * 2<br><br> 7^2<br><br> 7 // 2<br><br> 7 ** 2
    12·2 answers
  • Steve is happy today but he ____ yesterday​
    7·2 answers
  • When testing a game, why might you consider throttling the game’s “frames per second”?
    9·1 answer
  • Hola, alguien aquí me podría ayudar dándome ideas a cerca de office (Word, PowerPoint o Excel) estoy desesperada no puedo pensar
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!