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
Lyrx [107]
2 years ago
9

The sequence's insert member function normally puts a new item before the current item. What should insert do if there is no cur

rent item?A) The insert precondition is violated.B) The new item is put at the beginning of the sequence.C) The new item is put at the end of the sequence.D) None of the above.
Computers and Technology
1 answer:
igomit [66]2 years ago
5 0

Answer:

B) The new item is put at the beginning of the sequence

Explanation:

The stack data structure is an example of the type for insert method as the current items are replaced at the top by a new item and the previous items move down the stack. If there no current item in the stack, the new item is put in the first index (beginning point) of the stack data structure.

You might be interested in
What is the following file format called? inv_nbr, inv_name, inv_cost 876521,battery,45.00
kiruha [24]

The  following file format of  inv_nbr, inv_name, inv_cost is called delimited format.

<h3>What is a delimited file in Excel?</h3>

The term "Delimited" is known to be a term that connote a form of  an  TXT file that tends to make use of tabs or an  CSV file that uses commas to  be able to separate and group your data.

Note also that a  delimited file is seen as a form of a given sequential file that is made up of column delimiters.

Therefore, The  following file format of  inv_nbr, inv_name, inv_cost is called delimited format.

Learn more about text format from

brainly.com/question/16397886

#SPJ1

Multiple Choice

fixed-width format

extensible markup

delimited format

hypertext format

6 0
1 year ago
The game begins with the player having 20 POINTS
kompoz [17]

Answer:

Following are the code to this question:

import random#import package for using random method  

def rolling_dice(): #defining method rolling_dice that uses a random number to calculate and add value in dice1 and dice2 variable

   dice1 = random.randint(1,6)

   dice2 = random.randint(1,6)

   return dice1 + dice2

def rolling(): # defining method rolling

   n_roll = 0  # defining num variable that initial value that is 0.

   p = 20 # defining variable p for looping, that points in between 1 and 59

   while p > 0 and p < 60: # defining loop that counts value dice value two times  

       d = rolling_dice()#defining d variable that hold method value

       n_roll+= 1 #defining n_roll that increment n_roll value by 1

       if d == 7 or d == 11:# defining if block that uses the d variable that checks either 7 or 11, player won d in p variable

           p+= d   # use p variable that adds d variable

       elif d == 2 or d == 3 or d == 12:#defining elif block to that checks d variable by using or operator  

           p-= d#defining d variable that decreases d variable variable

       else: # defining else block

           p1 = d # using p1 variable that store d value  

           while True:# defining loop that calculates values

               d = rolling_dice()#defining d variable that holds method values

               n_roll += 1 #increment the n_roll value by 1

               if d == 7:#defining if block that checks d value equal to 7

                   p -= p1#subtract the value of p1 in p variable  

                   break # exit loop

               elif d == p:#defining elif block to check d value is equal to p

                   p += p1#adds the value of p1 in p variable  

                   break#using break keyword

   if p<= 0:#defining if block that checks p-value is less then equal to 0  

       print('Player lost')#using print method

   elif p>= 60:#defining else block that checks p-value is greater than equal to 60

       print('Player won')#using print method to print the value

   print('number of dice rolls:', n_roll)#use print method to print n_rolls value

rolling()

Output:

Player lost

number of dice rolls: 38

Explanation:

In the above-given python code, a method "rolling_dice" is declared, inside the method two-variable "dice1 and dice2" is declared, that uses the random method to calculate the value in both variable and use the return keyword to add both values.

  • In the next step, another method the "rolling"  is declared, inside the method "n_roll and p" is declared that assigns the values and use the two while loop, inside the loop if block is defined that calculates the values.
  • In the next step, a condition block is used that stores value in the p variable and use the print method to print the "n_roll" value.  
8 0
3 years ago
Students who finish their homework after school are meeting a. intrapersonal and short-term goals b. normative and short-term go
3241004551 [841]

Answer: a. intrapersonal and short-term goals

Explanation:

Intrapersonal goals are those that we set for ourselves in our minds to accomplish. The students that are finishing their homework after school most probably set that goal in their minds and so meeting it would mean meeting their intrapersonal goals.

Homework is not a long term project but rather a short one that is usually meant to be completed within days. Completing it is therefore a short term goal.

The students who finish their homework after school are therefore accomplishing both their intrapersonal and short-term goals.

6 0
3 years ago
Read 2 more answers
Write a simple algorithm in pseudocode that asks the user their favourite colour and then agrees with their choice, quoting the
olga55 [171]

Answer:

i am still a beginner in this but i hope it helps.

  • add scanner object;
  • declare string FavColour;
  • print msg to ask user for input
  • scan input FavColour;
  • print msg (" your favourite colour is " + FavColour)

3 0
3 years ago
When using Microsoft word, what would happen to the text of a paragraph if the "Justify" option is used?
Bond [772]
Hello, and thank you for asking your question!

When you click on the 'Justify' option on any type of word pad, it'll make all lines of words perfectly aligned. Here is a quick few-sentence example I made. 
(Photo)

Hope this helps! ☺♥

3 0
3 years ago
Other questions:
  • As the team leader, John ensures that all his teammates are clear in the team goals they need to achieve. He demonstrates the qu
    12·2 answers
  • A Write about why it is important for a person to upgrade their job skills
    14·1 answer
  • What component of Kerberos is responsible for storing keys for encrypting and decrypting data in the authentication process?
    13·1 answer
  • ____ is a method of querying and reporting that takes data from standard relational databases, calculates and summarizes the dat
    11·1 answer
  • How can a signature be added to an email message? Check all that apply.
    10·2 answers
  • When a person bullies someone using technology, it's called:
    9·2 answers
  • Dr. Kim divides a programming class into groups. Each group will create a large program as their
    15·2 answers
  • Did brainly.com go down today? i coudlnt get in it
    15·2 answers
  • Write a program that uses a while loop to calculate and print the multiples of 3 from 3 to 21. Your program should print each nu
    11·1 answer
  • How are 1gls different from 2gls​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!