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 are the similarities between vertical and horizontal scroll bar​
professor190 [17]

Answer:

1. They both have arrows at the beginning and end of their scroll.

2. They are both used for extending the users view to rangers that are not currently present on the screen.

3. They are both located at the far right bottom of an open program in a computer screen.

4.They can be used in thesame way by dragging the scroll bar or clicking on the arrows on either side of the scroll bar.

Explanation:

Note that:

The vertical scroll bar is the one which extends from top to bottom.

While the horizontal scroll bar extends from left to right.

8 0
3 years ago
Read 2 more answers
A ________ is a temporary symbol or variable that you can replace subsequently with an element of your choice
dezoksy [38]
I believe the answer you are looking for is what's called an assignment statement. In computer programming, an assignment statement sets and/or resets the value stored in the storage location(s) denoted by a variable name; in other words, it copies a value into the variable. Also, in most imperative programming languages, the assignment statement or expression is a fundamental construct.
5 0
4 years ago
Write the lyrics toooo.. Saints. Who every gets it correct gets brainliest!<br> No copying
Orlov [11]
I'm sorry but your story isn't adding up
Think your religion is a lie to keep my mouth shut
So I won't testify the crimes you're keeping score of
Why don't you throw me to the wolves? I thought you were one
You were standing there like an angry god
Counting out my sins just to cross them off
Saying that my tongue was too loud to trust
And that my blood couldn't keep you
My dear, you're not so innocent
You're fooling Heaven's gates
So you won't have to change
You're no saint, you're no savior
Your revelations don't look nothing like the pictures
You read between the lines and don't stick to the scriptures
You only follow rules if others follow with you
That doesn't sound so holy only playing victim
You were standing there like an angry god
Counting out my sins just to cross them off
Saying that my tongue was too loud to trust
And that my blood couldn't keep you
My dear, you're not so innocent
You're fooling Heaven's gates
So you won't have to change
You're no saint, you're no savior
So keep your judgment for someone else, I've had enough
And keep your judgment for someone else, I've had enough
So keep your judgment for someone else, I've had enough
And keep your judgment for someone else, I've had enough
My dear, you're not so innocent
You're fooling Heaven's gates
So you won't have to change
You're no saint, you're no savior
6 0
3 years ago
In this assignment you'll write a program that encrypts the alphabetic letters in a file using the Hill cipher where the Hill ma
mafiozo [28]

Answer: Provided in the explanation section

Explanation:

C++ Code

#include<iostream>

#include<fstream>

#include<string>

using namespace std;

// read plain text from file

void readPlaneText(char *file,char *txt,int &size){

  ifstream inp;

 

  inp.open(file);

 

  // index initialize to 0 for first character

 

  int index=0;

  char ch;

 

  if(!inp.fail()){

      // read each character from file  

      while(!inp.eof()){

          inp.get(ch);

          txt[index++]=ch;

      }

  }

 

  // size of message

  size=index-1;

}

// read key

int **readKey(char *file,int **key,int &size){

  ifstream ink;

 

  //

  ink.open(file);

      if(!ink.fail()){

         

          // read first line as size

      ink>>size;

     

      // create 2 d arry

      key=new int*[size];

     

      for(int i=0;i<size;i++){

          key[i]=new int[size];

      }

     

      // read data in 2d matrix

      for(int i=0;i<size;i++){

          for(int j=0;j<size;j++){

              ink>>key[i][j];

          }  

      }

  }

  return key;

}

// print message

void printText(string txt,char *msg,int size){

  cout<<txt<<":\n\n";

 

  for(int i=0;i<size;i++){

      cout<<msg[i];

  }

}

// print key

void printKey(int **key,int size){

  cout<<"\n\nKey matrix:\n\n";

  for(int i=0;i<size;i++){

      for(int j=0;j<size;j++){

          cout<<key[i][j]<<" ";

      }  

      cout<<endl;

  }

}

void encrypt(char *txt,int size,int **key,int kSize,char *ctxt){

  int *data=new int[kSize];

 

  for(int i=0;i<size;i=i+kSize){  

 

  // read key size concecutive data

      for(int a=0;a<kSize;a++){

          data[a]=txt[i+a]-'a';

      }

     

      // cipher operation

      for(int a=0;a<kSize;a++){

          int total=0;

          for(int b=0;b<kSize;b++){

              total+=key[a][b]*data[b];

          }  

          total=total%26;

          ctxt[i+a]=(char)('a'+total);

      }      

  }

}

int main(int argc,char **argv){

  char text[10000];

  char ctext[10000];

  int **key;

  int keySize;

  int size;

  // input

  key=readKey(argv[1],key,keySize);

  readPlaneText(argv[2],text,size);

  encrypt(text,size,key,keySize,ctext);

 

  // output

  printKey(key,keySize);

  cout<<endl<<endl;

  printText("Plaintext",text,size);

  cout<<endl<<endl;

  printText("Ciphertext",ctext,size);

 

  return 0;

}

cheers i hope this helped !!!

4 0
3 years ago
Where is the “Notes” option displayed in MS PowerPoint 2013? (I use a chromebook :P)
kow [346]

Answer:

menu bar

Explanation:

3 0
3 years ago
Other questions:
  • What bug was supposed to start affecting computers on january 1 2000
    9·1 answer
  • The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
    7·1 answer
  • If you are working on a document and want to have Word automatically save the document every minute, what steps should you use t
    13·1 answer
  • What are several different types of software, which sit in the middle of and provide connectivity between two or more software a
    13·1 answer
  • One way to describe the note-taking tool eNotes is to call it an electronic notebook. electronic sticky note. online web clippin
    5·2 answers
  • Word provides rulers along the bottom and right margins to help you as you format your documents is true or false?
    13·1 answer
  • 1. Web and mobile applications allow users to be actively engaged in an online activity.
    8·1 answer
  • What is the initial page of the website​
    9·1 answer
  • What is the difference between a computer’s RAM and its hard disk?
    13·2 answers
  • Television, the internet, and smartphones are different communication _______blank hsn uses in its imc.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!