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
Angelina_Jolie [31]
3 years ago
15

Help a fellow coder and anser these 5 questions

Computers and Technology
1 answer:
BlackZzzverrR [31]3 years ago
4 0

Answer: yes because it helps

Explanation: it shows everything

You might be interested in
Given a collection of n nuts and a collection of n bolts, arranged in an increasing order of size, give an O(n) time algorithm t
kari74 [83]

Answer:

See explaination

Explanation:

Keep two iterators, i (for nuts array) and j (for bolts array).

while(i < n and j < n) {

if nuts[i] == bolts[j] {

We have a case where sizes match, output/return

}

else if nuts[i] < bolts[j] {

this means that size of nut is smaller than that of bolt and we should go to the next bigger nut, i.e., i+=1

}

else {

this means that size of bolt is smaller than that of nut and we should go to the next bigger bolt, i.e., j+=1

}

}

Since we go to each index in both the array only once, the algorithm take O(n) time.

8 0
3 years ago
1. Assume that word is a variable of type String that has been assigned a value . Assume furthermore that this value always cont
s2008m [1.1K]

Answer:

1.word = "George slew the dragon"

startIndex = word.find('dr')

endIndex = startIndex + 4

drWord = word[startIndex:endIndex]

2. sentence = "Broccoli is delicious."

sentence_list = sentence.split(" ")

firstWord = sentence_list[0]

Explanation:

The above snippet is written in Python 3.

1. word is initialized to a sentence.

Then we find the the occurence of 'dr' in the sentence which is assign to startIndex

We then add 4 to the startIndex and assign it to endIndex. 4 is added because we need a length of 4

We then use string slicing method to create a substring from the startIndex to endIndex which is assigned to drWord.

2. A string is assigned to sentence. Then we split the sentence using sentence.split(" "). We split based on the spacing. The inbuilt function of split returns a list. The first element in the list is assigned to firstWord. List uses zero based index counting. So. firstWord = sentence_list[0] is use to get first element.

4 0
3 years ago
Create a test that prompts a user to enter a 5-digit PIN in the main procedure and then calls Validate PIN procedure to validate
Pie

Answer:

See explaination

Explanation:

#include <iomanip>

#include <string>

#include <fstream>

using namespace std;

void getName(string);

void getPin(int,int);

void displayMenu(int);

string name;

int pin1, pin2, ch ;

int main()

{

cout << fixed << showpoint << setprecision(2);

getName(name);

getPin(pin1,pin2);

displayMenu(ch );

system("pause");

}

void getName(string name)

{

cout << "Enter your name: ";

cin >> name;

if (name = "AXBY") || (name != "ABGSHY"))

{

getName(name);

}

}

void getPin(int pin1, int pin2)

{

string name;

if (name == "AXBY")

{

cout << "Please Enter Pin: ";

cin >> pin1;

if (pin1 != 4433)

{

cout << "Pin incorrect please try again!";

cin >> pin1;

}

}

if (name == "ABGSHY")

{

cout << "Please Enter Pin: ";

cin >> pin2;

if (pin2 != 2849)

{

cout << "Pin incorrect please try again!";

cin >> pin2;

}

}

}

void displayMenu(int ch )

{

cout << "[1] Check your account Balance\n"

"[2] Withdraw funds\n"

"[3] Deposit funds\n"

"Please Enter Choice: ";

cin >> ch ;

if (ch != 1 || ch != 2 || ch != 3)

{

cout << "Choice is incorrect, enter choice now: ";

cin >> ch ;

}

}

4 0
3 years ago
True or false, cloud storage does not require internet access?
Dmitry_Shevchenko [17]
False, the storage is being accessed from the cloud which can only be accessed through an internet connection.
3 0
3 years ago
What are 3 possible causes of getting a "network cable unplugged" message on a pc, assuming that the cable is not actually unplu
Nat2105 [25]
I've had that problem before. The cause of my problem was 2 things and that was the age of the cable, and build up of dust on each of the cable.
7 0
3 years ago
Other questions:
  • What is a break in the content that forces takes on to the next line
    10·2 answers
  • A _______ is smaller than a notebook or laptop and has a touchscreen and sometimes a pointing device.
    13·1 answer
  • What are finger nails made of?-
    12·2 answers
  • Question 7 (True/False Worth 3 points)
    8·2 answers
  • what will happen to the contents of the destination ell if you copy the contents of the source cell into the destination cell
    7·1 answer
  • What goes in between the &lt; &gt; when declaring a new ArrayList?
    14·1 answer
  • Can you help me with this question please ​
    13·1 answer
  • Help101111 avatar can we be friend's please? My name is Keegan. what is yours?
    12·1 answer
  • Meta is a penetration testing engineer assigned to pen test the security firm's network. So far, she cannot tunnel through the n
    12·1 answer
  • 5. Nadia wants to calculate the total interest, which is the total amount of the payments minus the loan amount. In cell F6, ent
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!