Write a program which simulate rolling dice. When the program runs, it will prompt the user to choose a number ranging from 1 to 6. It will then randomly choose a number between 1 and 6. The program will print the message "Your guess is correct!" if the guess number equals to the dice number, otherwise it will print "Wow! The dice number is --.". It should then ask the user if you’d like to roll again. Enter "1" to roll again and enter "0" to end the game. Concepts to keep in mind:

Concepts to keep in mind:
• Random
• Integer
• Print
• While Loops

Output:
Enter your guess number between 1 and 6: 5
Wow! The dice number is 1
Do you want to dice it up again:Enter 1 and if not enter 01
Enter your guess number between 1 and 6: 4
Wow! The dice number is 1
Do you want to dice it up again:Enter 1 and if not enter 01

Answers

Answer 1

Answer:

Written in Python

import random

tryagain = 1

while tryagain == 1:

guess = int(input("Enter your guess number between 1 and 6: "))

num = random.randint(1,7)

if guess == num:

print("Your guess is correct")

else:

print("Wow, the dice number is "+str(num))

tryagain = int(input("Do you want to dice it up again:Enter 1 and if not enter 0: "))

Explanation:

I've added the full source code as an image attachment where I used comments to explain difficult lines

Write A Program Which Simulate Rolling Dice. When The Program Runs, It Will Prompt The User To Choose

Related Questions

Create a TeeShirt class for Toby’s Tee Shirt Company. Fields include:

orderNumber - of type int size - of type String color - of type String price - of type double Create set methods for the order number, size, and color and get methods for all four fields. The price is determined by the size: $22.99 for XXL or XXXL, and $19.99 for all other sizes. Create a subclass named CustomTee that descends from TeeShirt and includes a field named slogan (of type String) to hold the slogan requested for the shirt, and include get and set methods for this field.

Answers

Answer:

Here is the TeeShirt class:

public class TeeShirt{  //class name

   private int orderNumber;  // private member variable of type int of class TeeShirt to store the order number

   private String size;  // to store the size of tshirt

   private String color;  //  to store the color of shirt

   private double price;  // to store the price of shirt

   public void setOrderNumber(int num){  //mutator method to set the order number

       orderNumber = num;     }    

   public void setColor(String color){  //mutator method to set the color

       this.color = color;        }      

       

     public void setSize(String sz){  //mutator method to set the shirt size

   size = sz;  

   if(size.equals("XXXL") || size.equals("XXL")){  //if shirt size is XXL or XXXL

       price = 22.99;  // set the price to 22.99 if shirt size is XXL or XXXL

   }else{  //for all other sizes of shirt

       price = 19.99;     }  }  //sets the price to 19.99 for other sizes

   public int getOrderNumber(){  //accessor method to get the order number stored in orderNumber field

       return orderNumber;     }  //returns the current orderNumber

   public String getSize(){  //accessor method to get the size stored in size field

       return size;     }  //returns the current size

   public String getColor(){  //accessor method to get the color stored in color field

       return color;     }  //returns the current color

   public double getPrice(){  //accessor method to get the price stored in price field

       return price;      }  } //returns the current price

Explanation:

Here is the sub class CustomTee:

public class CustomTee extends TeeShirt {  //class CustomTee that inherits from class TeeShirt

private String slogan;   //private member variable of type String of class CustomTee to store slogan

public void setSlogan(String slgn) {  //mutator method to set the slogan

slogan = slgn; }

public String getSlogan() {  //accessor method to get the slogan stored in slogan field

return slogan;}  } //returns the current slogan

Here is DemoTees.java

import java.util.*;

public class DemoTees{  //class name

public static void main(String[] args)  {  //start of main method

TeeShirt tee1 = new TeeShirt();  //creates object of class TeeShirt named tee1

TeeShirt tee2 = new TeeShirt(); //creates object of class TeeShirt named tee2

CustomTee tee3 = new CustomTee(); //creates object of class CustomTee named tee3

CustomTee tee4 = new CustomTee();  //creates object of class CustomTee named tee4

tee1.setOrderNumber(100);  //calls setOrderNumber method of class TeeShirt using object tee1 to set orderNumber to 100

tee1.setSize("XXL");  //calls setSize method of class TeeShirt using object tee1 to set size to XXL

tee1.setColor("blue");  //calls setColor method of class TeeShirt using object tee1 to set color to blue

tee2.setOrderNumber(101);  //calls setOrderNumber method of class TeeShirt using object tee2 to set orderNumber to 101

tee2.setSize("S");  //calls setSize method of class TeeShirt using object tee2 to set size to S

tee2.setColor("gray");  //calls setColor method of class TeeShirt using object tee2 to set color to gray

tee3.setOrderNumber(102);   //calls setOrderNumber method of class TeeShirt using object tee3 of class CustomTee to set orderNumber to 102

tee3.setSize("L");  //calls setSize method of class TeeShirt using object tee3 to set size to L

tee3.setColor("red");  //calls setColor method of class TeeShirt using object tee3 to set color to red

tee3.setSlogan("Born to have fun");  //calls setSlogan method of class CustomTee using tee3 object to set the slogan to Born to have fun

tee4.setOrderNumber(104);  //calls setOrderNumber method of class TeeShirt using object tee4 of class CustomTee to set orderNumber to 104

tee4.setSize("XXXL");  //calls setSize method to set size to XXXL

tee4.setColor("black");  //calls setColor method to set color to black

tee4.setSlogan("Wilson for Mayor");  //calls setSlogan method to set the slogan to Wilson for Mayor

display(tee1);  //calls this method passing object tee1

display(tee2);  //calls this method passing object tee2

displayCustomData(tee3);  //calls this method passing object tee3

displayCustomData(tee4);  }   //calls this method passing object tee4

public static void display(TeeShirt tee) {  //method display that takes object of TeeShirt as parameter

System.out.println("Order #" + tee.getOrderNumber());  //displays the value of orderNumber by calling getOrderNumber method using object tee

System.out.println(" Description: " + tee.getSize() +  " " + tee.getColor());  //displays the values of size and color by calling methods getSize and getColor using object tee

System.out.println(" Price: $" + tee.getPrice()); }  //displays the value of price by calling getPrice method using object tee

public static void displayCustomData(CustomTee tee) {  //method displayCustomData that takes object of CustomTee as parameter

display(tee);  //displays the orderNumber size color and price by calling display method and passing object tee to it

System.out.println(" Slogan: " + tee.getSlogan());  } } //displays the value of slogan by calling getSlogan method using object tee

In this exercise we have to use the knowledge in computational language in JAVA to write the following code:

We have the code can be found in the attached image.

So in an easier way we have that the code is

public class TeeShirt{  

  private int orderNumber;

  private String size;  

  private String color;

  private double price;  

  public void setOrderNumber(int num){  

      orderNumber = num;     }    

  public void setColor(String color){  

      this.color = color;        }  

    public void setSize(String sz){  

  size = sz;  

  if(size.equals("XXXL") || size.equals("XXL")){  

      price = 22.99;  

  }else{

      price = 19.99;     }  }

  public int getOrderNumber(){  

      return orderNumber;     }

  public String getSize(){  

      return size;     }  

  public String getColor(){  

      return color;     }  

  public double getPrice(){

      return price;      }  }

public class CustomTee extends TeeShirt {  

private String slogan;  

public void setSlogan(String slgn) {

slogan = slgn; }

public String getSlogan() {

return slogan;}  }

import java.util.*;

public class DemoTees{

public static void main(String[] args)  {

TeeShirt tee1 = new TeeShirt();

TeeShirt tee2 = new TeeShirt();

CustomTee tee3 = new CustomTee();

CustomTee tee4 = new CustomTee();

tee1.setOrderNumber(100);  

tee1.setSize("XXL");  

tee1.setColor("blue");  

tee2.setOrderNumber(101);

tee2.setSize("S");  

tee2.setColor("gray");  

tee3.setOrderNumber(102);  

tee3.setSize("L");

tee3.setColor("red");  

tee3.setSlogan("Born to have fun");  

tee4.setOrderNumber(104);  

tee4.setSize("XXXL");  

tee4.setColor("black");  

tee4.setSlogan("Wilson for Mayor");  

display(tee1);  

display(tee2);

displayCustomData(tee3);

displayCustomData(tee4);  }  

public static void display(TeeShirt tee) {  

System.out.println("Order #" + tee.getOrderNumber());

System.out.println(" Description: " + tee.getSize() +  " " + tee.getColor());  

System.out.println(" Price: $" + tee.getPrice()); }

public static void displayCustomData(CustomTee tee) {

display(tee);  

System.out.println(" Slogan: " + tee.getSlogan());  } }

See more about JAVA at brainly.com/question/18502436

Jake or Peggy Zale must fix quickly the fax.

Answers

Answer:

Sentence: Jack or Peggy Zale must fix quickly the fax.

Correct: Either Jack or Peggy Zale must quickly fix the fax.

There are 2 errors in these sentence construction. In stating two persons as an option we must use the word "either" to indicate that you only have two choose from the two of them. The word "

Explanation:

The correct sentence would be "either Jake or Peggy Zale must quickly fix the fax".

In the question construction, there is a conjunction and misarrangement error.

In conclusion, the word " "either Jake or Peggy Zale must quickly fix the fax" is correct

Read more about conjunction

brainly.com/question/8094735

Why the shape of a cell is hexagonal

Answers

Answer:

Hexagonal cell shape is perfect over square or triangular cell shapes in cellular architecture because it cover an entire area without overlapping i.e. they can cover the entire geographical region without any gaps.

I hope this helps

Pls mark as brainliest

Hexagonal shapes are preferred over squares, or circles because it covers an entire area without overlapping. It requires fewer cells.

A CPU with a quad-core microprocessor runs _____ times as fast as a computer with a single-core processor.

two

three

four

eight

Answers

Four is the rught answer i don’t think so

Answer:

four

Explanation:

quad means four so it runs four times faster

In 2-5 paragraphs, describe how technology helps business professionals to be more efficient.

Answers

The ways that technology helps business professionals to be more efficient is that  Business professionals may stay more organized, communicate more effectively, and keep firms secure with the use of technology.

Technology makes it simpler to connect with employees by utilizing e-mail and memos, and it helps keep employee information and corporate paperwork a lot more organized using computers and software.

How does technology improve the productivity of business people?

By streamlining time-consuming procedures, technology also increases office productivity. For instance, using document management software eliminates the need for manual data entry, filing, as well as in file retrieval.

Therefore, one can say that Technology can be used to safeguard private executive decisions, financial data, and other forms of proprietary information that gives a company a competitive edge. Simply simply, technology aids firms in protecting their ideas from rivals.

Learn more about technology from

https://brainly.com/question/1162014
#SPJ1

Please help me. Anyone who gives ridiculous answers for points will be reported.

Answers

Answer:

Well, First of all, use Linear

Explanation:

My sis always tries to explain it to me even though I know already, I can get her to give you so much explanations XD

I have the Longest explanation possible but it won't let me say it after 20 min of writing

1 megabyte is equal to 1024 gigabyte. True/False​

Answers

Answer:

false

Explanation:

1 MB = 0.001 GB

For this assignment, you will create flowchart usingFlowgorithm and Pseudocode for the following program example:You are to design a program for Alexander’s Coffee Shopproviding customer research data. When a customer places an order,the clerk asks the customer for their zip code and age. The clerkenters this data as well as the number of items purchased. Theprogram should operate continuously until the clerk enters a 0 forthe zip code at the end of the day. If the clerk enters an invalidage (defined as less than 10 or more than 100), an error message isdisplayed and the program re-prompts the clerk continuously toenter a valid age. At the end of the program, display the averagecustomer age as well as counts of the number of items ordered bycustomers under the age of 25 and customers 25 and older.

Answers

Answer:

The flowchart is attached

Oredered accordinly with the flowcahrt number

3.What are the pros and cons of using a linked implementation of a sparse matrix, as opposed to an array-based implementation

Answers

Answer:

speed and storage

Explanation:

The pros and cons of both are mainly in regards to speed and storage. Due to linked lists elements being connected to one another it requires that each previous element be accessed in order to arrive at a specific element. This makes it much slower than an array-based implementation where any element can be quickly accessed easily due to it having a specific location. This brings us to the other aspect which is memory. Since Arrays are saved as a single block, where each element has a specific location this takes much more space in the RAM as opposed to a linked implementation which is stored randomly and as indexes of the array itself.

Array Implementation:

Pros: Much Faster and Easier to target a specific elementCons: Much More Space needed

Linked Implementation

Pros: Less overall space neededCons: Much slower speed.

In a system where Round Robin is used for CPU scheduling, the following is TRUE when a process cannot finish its computation during its current time quantum? The process will terminate itself. The process will be terminated by the operating system. The process's state will be changed from running to blocked. None of the mentioned.

Answers

Answer:

B. The process will be terminated by the operating system.

Explanation:

When Round Robin is used for CPU scheduling, a time scheduler which is a component of the operating system is used in regulating the operation. A time limit is set for each of the processes to be run.

So, when a process fails to complete running before its time elapses, the time scheduler would log it off and return it to the queue. This queue is in a circular form and gives each of the processes a chance to run its course.

Based on the information given regarding CPU scheduling, the correct option is C. The process's state will be changed from running to blocked.

It should be noted that in a system where Round Robin is used for CPU scheduling, when a process cannot finish its computation during its current time quantum, the process's state will be changed from running to blocked.

It should be noted that a prices transition to a blocked state occurs when it's waiting for some events like a particular resource becoming available.

Learn more about CPU scheduling on:

https://brainly.com/question/19999569

Complete the sentence.
____ use only apps acquired from app stores.

O tablets
O laptops
O servers
O desktops

Answers

The answer is Tablets

Answer:

Tablets

Explanation:

I say so

How does asymmetric encryption work?
A.
It uses only one key to encrypt and decrypt a message.
B.
A private key is used to encrypt the message and the public key is used to decrypt the message.
C.
Either the public key or the private key can be used to encrypt and decrypt a message.
D.
Public key is used to encrypt the message and private key is used to decrypt the message.

Answers

Answer:

i choose choice D

Explanation:

reason as to my answer public keys are simply input keys used to encrypt data into either a computer or any electrical device as private keys are out put used to either erase or edit

what is scientific and​

Answers

Answer:

And what??????????????

And what? You didn’t finish

How has the rise of mobile development and devices impacted the IT industry, IT professionals, and software development

Answers

Answer:

Throughout the interpretation section elsewhere here, the explanation of the problem is summarized.

Explanation:

The growth of smartphone production and smartphone apps and services, as well as the production of smartphones, has had a positive influence on the IT industry, IT practitioners, as well as the development of the technology. As normal, the primary focus is on smartphone apps instead of just desktop software. As we recognize, with innovative features, phone applications, and smartphones are all made, built, modernized every day, and always incorporated with either the latest technology.This has now resulted in far more jobs and employment for the IT sector, and therefore new clients for service-based businesses. It provided various-skilling the application production industry for IT experts including learning how to work on emerging technology. The demand for software production and software growth is evolving at a greater speed than it's ever been, so the increase of smartphone production and smartphones has had a very beneficial effect on perhaps the IT sector, IT practitioners, and business development.

How can a LAN be changed into a WAN?

Answers

Answer:

I hope the above picture may help you.

Yea what he said

(Sorry I just need these last points but I figured since probably no one else would answer that I could use these points so....sorry)

Wireless technology is best described as a/an

stationary computing system.

office computing system.

mobile computing system.

inflexible computing system.

Answers

Answer:

mobile computing system

Explanation:

Answer:

mobile computing system... C

James uses a database to track his school's football team. Which feature in a database allows James to find a specific player by name?

Grid
Filter
Search
Sort

Answers

Search if he knows the players name

Answer:

search

Explanation:

The Gas-N-Clean Service Station sells gasoline and has a car wash. Fees for the car wash are $1.25 with a gasoline purchase of $10.00 or more and $3.00 otherwise. Three kinds of gasoline are available: regular at $2.89, plus at $3.09, and super at $3.39 per gallon. User Request:
Write a program that prints a statement for a customer. Analysis:
Input consists of number of gallons purchased (R, P, S, or N for no purchase), and car wash desired (Y or N). Gasoline price should be program defined constant. Sample output for these data is
Enter number of gallons and press 9.7
Enter gas type (R, P, S, or N) and press R
Enter Y or N for car wash and press Y
**************************************
* *
* *
* Gas-N-Clean Service Station *
* *
* March 2, 2004 *
* * ************************************** Amount Gasoline purchases 9.7 Gallons Price pre gallons $ 2.89 Total gasoline cost $ 28.03 Car wash cost $ 1.25 Total due $ 29.28 Thank you for stopping Pleas come again Remember to buckle up and drive safely

Answers

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

              //print the header

              System.out.println("**************************************");

              System.out.println("*                                    *");

              System.out.println("*                                    *");

              System.out.println("*   Gas-N-Clean Service Station      *");

              System.out.println("*                                    *");

              System.out.println("*   March 2, 2004                    *");

              System.out.println("*                                    *");

              System.out.println("**************************************");

 

               //set the constant values for gasoline

               final double REGULAR_GASOLINE = 2.89;

               final double PLUS_GASOLINE = 3.09;

               final double SUPER_GASOLINE = 3.39;

 

              // initialize the variables as 0

              double gasolinePrice = 0, gasolineCost = 0, carWashCost = 0, totalCost = 0;

 

               Scanner input = new Scanner(System.in);

 

               //ask the user to enter the gallons, gas type and car wash choice

               System.out.print("Enter number of gallons ");

               double gasolinePurchase = input.nextDouble();

               System.out.print("Enter gas type (R, P, S, or N) ");

               char gasType = input.next().charAt(0);

               System.out.print("Enter Y or N for car wash ");

               char carWashChoice = input.next().charAt(0);

               //check the gas type. Depending on the choice set the gasolinePrice from the corresponding constant value

              if(gasType == 'R')

                  gasolinePrice = REGULAR_GASOLINE;

              else if(gasType == 'P')

                  gasolinePrice = PLUS_GASOLINE;

              else if(gasType == 'S')

                  gasolinePrice = SUPER_GASOLINE;

 

                //calculate the gasolineCost

                gasolineCost = gasolinePurchase * gasolinePrice;

 

               //check the carWashChoice. If it is yes and gasolineCost is greater than 10, set the carWashCost as 1.25. Otherwise, set the carWashCost as 3.00

               if(carWashChoice == 'Y'){    

                   if(gasolineCost >= 10)

                       carWashCost = 1.25;

                   else

                       carWashCost = 3.00;

               }

              //calculate the total cost, add gasolineCost and carWashCost

              totalCost = gasolineCost + carWashCost;

 

               //print the values in required format

              System.out.println("Amount Gasoline purchases " + gasolinePurchase);

              System.out.println("Gallons Price per gallons $ " + gasolinePrice);

              System.out.printf("Total gasoline cost $ %.2f\n", gasolineCost);

              System.out.println("Car wash cost $ " + carWashCost);

              System.out.printf("Total due $ %.2f\n", totalCost);

               System.out.println("Thank you for stopping\nPlease come again \nRemember to buckle up and drive safely");

}  

}

Explanation:

*The code is in Java.

Please see the comments in the code for explanation

In Python
Write the special method __str__() for CarRecord.

Sample output with input: 2009 'ABC321'
Year: 2009, VIN: ABC321

Answers

Answer:

def __str__(self):

       return ('Year: %d, VIN: %s' %(self.year_made, self.car_vin))

Explanation:

Here you go! This should do it.

The program gives an implementation of the car record class which displays the model year and registration number of a car. The program written in python 3 goes thus :

class CarRecord :

#initialize a class named carRecord

def __init__(self):

#define the init method of the class

self.year_made = 0

#year car was made is initialized to 0 (integer)

self.car_vin = ' '

#vehicle registration is an empty string

def __str__(self):

#define an str method

return f"Year:{self.year_made}, VIN:{self.car_vin}"

#returns formatted display of the year and VIN number

my_car = CarRecord()

#creates an instance of the carRecord class

my_car.year_made = int(input())

#prompts user for the model year of the car

my_car.car_vin = input()

#prompts user for the model Vin number

print(my_car)

# display the details

A sample run of the program is given

Learn more :https://brainly.com/question/20504501

Online Privacy
1.)Explain why is online privacy a controversial topic?
2.)Explain why this issue is applicable to you and your peers.
3.)Explain why this issue is a federal issue and not a state or local issue.

Answers

Answer:

Yes

Explanation:

Online privacy is a controversial topic due to the fact that it's a very hard thing to navigate. Some websites use cookies that are used to store your data so in a way there taking your privacy away which is controversial because of the way they use the information. Some websites store it for use of ads while others sell it. This issue is applicable to me and my peers because of the way we use technology. It can be used to steal my information about where I live and what I look up online. Also, the information stored could have my credit or debit card credentials. This issue should be a federal and nationwide issue because this is an everyday occurrence and leaves tons of people in crushing   debt every year.

If the propagation delay through a full-adder (FA) is 150 nsec, what is the total propagation delay in nsec of an 8-bit ripple-carry adder

Answers

Answer:

270 nsec

Explanation:

Ripple-carry adder is a combination of multiple full-adders. It is relatively slow as each full-adder waits for the output of a previous full-adder for its input.

Formula to calculate the delay of a ripple-carry adder is;

  = 2( n + 1 ) x D

delay in a full-adder = 150 nsec.

number of full-adders = number of ripple-carry bits = 8

 = 2 ( 8 + 1 ) x 150

 = 18 x 150

 = 270 nsec

Convert the following C program to C++.

More instructions follow the code.

#include
#include

#define SIZE 5

int main(int argc, char *argv[]) {
int numerator = 25;
int denominator = 10;
int i = 0;

/*
You can assume the files opened correctly and the
correct number of of command-line arguments were
entered.
*/
FILE * inPut = fopen(argv[1], "r");
FILE * outPut = fopen(argv[2], "w");

float result = (float)numerator/denominator;
fprintf(outPut,"Result is %.2f\n", result);

float arr[SIZE];

for( ; i < SIZE; i++) {
fscanf(inPut, "%f", &arr[i]);
fprintf(outPut, "%7.4f\n", arr[i]);
}

return 0;
}

Notice this is uses command-line arguments. I have provided an input file called num.txt that will be used when running the program. The output file is called out.txt.

Make sure you are using C++ style file I/O (FILE pointers/fopen) as well as regular I/O including the C++ style output formatting (fscanf, fprintf, formatting). Also use the C++ method of casting. The lines above that are bold are the lines that you need to convert to C++. Don't forget to add the necessary C++ statements that precede the main() function.

Answers

Answer:

The program equivalent in C++ is:

#include <cstdio>

#include <cstdlib>

#define SIZE 5

using namespace std;

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

int numerator = 25;

int denominator = 10;

FILE * inPut = fopen(argv[1], "r");

FILE * outPut = fopen(argv[2], "w");

float result = (float)numerator/denominator;

fprintf(outPut,"Result is %.2f\n", result);

float arr[SIZE];

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

fscanf(inPut, "%f", &arr[i]);

fprintf(outPut, "%7.4f\n", arr[i]);

}

return 0;

}

Explanation:

See attachment for explanation.

Each line were numbered with equivalent line number in the C program

create a boolean variable called sucess that will be true if a number is between -10 and 10 inclusively python

Answers

Answer:

success = -10 <= number <= 10

Explanation:

I check that -10 is less than or equal to number, and number is less than or equal to 10.

Technician A says that the last step in the diagnostic process is to verify the problem. Technician B says that the second step is to perform a thorough visual inspection. Who is correct

Answers

Answer:

The answer to this question is given below in the explanation section. However, the correct option is Technician B.

Explanation:

There are eight steps procedures to diagnose the engine.  

Step 1 Verify the Problem

Step 2 Perform a Thorough Visual Inspection and Basic Tests

Step 3 Retrieve the Diagnostic Trouble Codes (DTCs)

Step 4 Check for Technical Service Bulletins (TSBs)

Step 5 Look Carefully at Scan Tool Data

Step 6 Narrow the Problem to a System or Cylinder

Step 7 Repair the Problem and Determine the Root Cause

Step 8 Verify the Repair and Clear Any Stored DTCs

So the correct technician is Technician B that says that the second step is to perform a thorough visual inspection.

A country, called Simpleland, has a language with a small vocabulary of just “the”, “on”, “and”, “go”, “round”, “bus”, and “wheels”. For a word count vector with indices ordered as the words appear above, what is the word count vector for a document that simply says “the wheels on the bus go round and round.”

Please enter the vector of counts as follows: If the counts were ["the"=1, “on”=3, "and"=2, "go"=1, "round"=2, "bus"=1, "wheels"=1], enter 1321211.
1 point

Answers

Answer:

umm that is a todler song

Explanation:

umm that is a todler song that they sing to them when there crying

A country, called Simpleland, has a language with a small vocabulary of just “the”, “on”, “and”, “go”, “round”, “bus”, and “wheels”. As per the given scenario, the vector of counts will be 2111211. The correct option is C.

What are the ways to count items in a vector?

C++ has a built-in function that counts the length of the vector. Size is the function's name ().

It returns the size or total number of elements of the vector that was utilized to create it. There is no need for debate.

The number of observations (rows) includes deleted observations as well. In an SAS data collection, there can be a maximum of 2 63-1 observations, or roughly 9.2 quintillion observations. For the majority of users, going above that limit is quite rare.

The vector of counts in the above scenario will be 2111211.

Thus, the correct option is C.

For more details regarding programming, visit:

https://brainly.com/question/11023419

#SPJ2

Write a C program to input basic salary of an employee and calculate gross salary according to given conditions.

Basic Salary <= 10000 : HRA = 20%, DA = 80%
Basic Salary is between 10001 to 20000 : HRA = 25%, DA = 90%
Basic Salary >= 20001 : HRA = 30%, DA = 95%

Your program must calculate each employee's gross pay amount.

Answers

Answer:

Written in C

#include <stdio.h>

int main() {

   float salary;

   printf("Salary: ");

   scanf("%f", &salary);

   float HRA, DA;

   if(salary <= 10000){

       HRA = 0.20; DA = 0.80;

   }

   else if(salary >= 10000 && salary <= 20000){

       HRA = 0.25; DA = 0.90;

   }

   else{

       HRA = 0.30; DA = 0.95;

   }

   salary = salary + salary * HRA + salary * DA;

     printf("Gross Salary: %.2f\n", salary);

   return 0;

}

Explanation:

I've added the full program as an attachment where I used comments as explanation

how many basic element makes up a computer system​

Answers

Answer:

4

Explanation:

Input/output, datapath, control, and memory

There wrong its C bold it.

:)))))

A bank has three types of accounts: checking, savings, and loan. Following are the attributes for each type of account:
CHECKING: Acct No, Date Opened, Balance, Service Charge
SAVINGS: Acct No, Date Opened, Balance, Interest Rate
LOAN: Acct No, Date Opened, Balance, Interest Rate, Payment
Assume that each bank account must be a member of exactly one of these subtypes. Using generalization, develop an EER model segment to represent this situation using the traditional EER notation, the Visio notation, or other tools like Lucidchart / Draw.io. Remember to include a subtype discriminator.

Answers

Answer:

please find the attachment of a graph:

Explanation:

Description of the model:

Generalization is the method used here just for the EER model, which sweeping generalization is a way to identify the common characteristics of a sequence to create a common entity. This is an approach from the bottom up. Its verification, savings, and credit firms are extended to a higher-level object's account. So, the entity entities (Account) are the common traits of these bodies. As well as the specific qualities are the part of specialized entities (checks, savings, and loans). This EER model is shown via the subgroup and supertype notes. The Balance has calculated the distance, throughout the entity type entity are key patterns of the subgroup entities. The wood beaded includes Acct No, Balanced and Open Date. The key was its underliner Acct No. the very first key. CHECKING, SAVINGS, and LOAN are the subsection organizations of the Supertype Account.Its subtypes get the traits that are not normal. It Testing feature is the uncommon extra fee feature. Its SAVINGS post-type feature has the peculiar exchange rate feature. Its LOAN subgroup feature produces unusual interest in fixed payment characteristics.

Enhanced Entity relationships[EER] represent the requirements and complexities of a complex database.

What is Enhanced Entity-relationship?

Here, the account entity generalized into three entities and these are checking, savings, and loan.

Also, the common attribute the three of them have can be considered in the account entity which is common in them while the individual attributes must be specified under its own entity.

EER models are the helpful tools used for designing databases that have high-level models.

Learn more about databases on:

https://brainly.com/question/518894

The code below is supposed to display the name and score for the student with the highest score one time before the program ends. It is displaying Jim as the student with the highest score. It is displaying the highest score of 95. Unfortunately, Jim does not have a score of 95. Correct the following code:

Declare String students[SIZES] = {"Jen", "Jon", "Jan", "Joe", "Jim"}
Declare Integer scores[SIZES] = 70, 85, 72, 95, 90
Declare Integer index Declare Integer highest = scores[0]
Declare Integer highest Name = " " For index = 0
To SIZES //Assume that this translates to For (index = 0; index <= SIZES, index ++)
If scores[index] > highest then highest = scores[index]
End Of highestName = students[index]
End For Display "

The name of the student with the highest score is ", highest Name Display "The highest score is ", highest

Answers

Answer:

Modify

If scores[index] > highest then highest = scores[index]

End Of highest

Name = students[index]

End For Display

to

If scores[index] > highest then highest = scores[index]

Name = students[index]

End Of highest

End For Display

Explanation:

In the code, you posted the code segment that gets the name of the student with the highest score is outside the if condition that determines the highest.

To make correction, we only need to bring this code segment into the loop.

See Answer

A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output is the miles walked. If the input is 5345, the output is 2.6725.

Answers

In python:

print(steps_walked / 2000)

Other Questions
If f(x) = (1\7)(7x), what is f(3)? Solve the equation 5x+9=4. Solve the following system of equations algebraically:y = 4x^2 + 17x + 14 y = 2x + 5 lincoln middle school has a total of $200 to spend on notebooks and tablets HELPPP A credible source is one that isA: with biasB: not useful C: persuasive D: trustworthy The following table shows the cost of 444 party favor packs. For example, the Slinky costs \$9$9dollar sign, 9 for a pack of 555.Toy pack Cost (dollars) QuantitySlinky 999 555Wind-up robot 161616 888Yo-yo 151515 666Emoji beach ball 333 222Which toy pack has a cost of \$2.50$2.50dollar sign, 2, point, 50 per toy Bonita Beauty Corporation manufactures cosmetic products that are sold through a network of sales agents. The agents are paid a commission of 18% of sales. The income statement for the year ending December 31, 2014, is as follows.BONITA BEAUTY CORPORATIONIncome Statement For the Year Ended December 31, 2014Sales $75,000,000Cost of goods sold Variable $31,500,000 Fixed 8,610,000 40,110,000Gross margin $34,890,000Selling and marketing expenses Commissions $13,500,000 Fixed costs 10,260,000 23,760,000Operating income $11,130,000The company is considering hiring its own sales staff to replace the network of agents. It will pay its salespeople a commission of 8% and incur additional fixed costs of $7,500,000.Under the current policy of using a network of sales agents, calculate the Bonita Beauty Corporation The intersection of plane R and plane P is.Point is not on plane P.Line C E and Line D B intersect at point Browsers render web pages according to their own standards.True or false? what is the image of(8,12) after a dilation by a scale factor of 1/4 centered at the origin? Brainliest!!!! Moral development is development of: A. completely the result of reinforcement B. Completely innate C. An ability to make judgements D. A sense of what is right and wrong Jack bought 5.94 pounds of beef for dinner. What is the first step in rounding this number to the nearest tenth? What is the next step? What is 5.94 rounded to the nearest tenth? Imagine you operated a shipping and packaging service within New York City. You slowly expanded to include shipments and deliveries between New York, New Jersey, and Connecticut. After the expansion, could you be subject to regulation by either or all of the states and the federal government? Which court case outlines this? Explain your answer. Gibbons v. Ogden (1824) , McCulloch v. Maryland (1819) , Marbury v. Madison (1803) Rodrigo can carpet a house in twelve hours, working by himself. DaShawn can carpet the same house in ten hours . Working together, how long would it take Rodrigo and DaShawn to carpet the house Which sources would be considered the most credible places to find information related to teen drivers? Check all that apply.a student blog on teenage drivingthe National Highway Traffic Safety Administration the Washington Posts opinion sectionthe Insurance Institute for Highway Safetythe AAA Foundation for Traffic Safety The harappan civilization was known for Read this excerpt from The Miracle Worker.ANNIE: The only time I have trouble is when Im right.(But she is amused at herself, as is ANAGNOS.)Is it my fault its so often? I wont give them trouble, Mr. Anagnos, Ill be so ladylike they wont notice Ive come.ANAGNOS: Annie, be humble. It is not as if you have so many offers to pick and choose. You will need their affection, working with this child.Which word best describes Annie in this excerpt?intelligentrecklessconfidentpolite A jewelry artist is selling necklaces at an art fair. It costs $200 to rent a booth at the fair. The cost of materials for each necklace is $4.50. The artist is selling the necklaces at $20 each. The jewelry artist wants to make at least a profit of $300. Write an inequality that represents the situation. Make sure to write down the given information from the problem and represent your variables. Show all of your work. B). Find a possible solution for the inequality. Show all of your work and check your answer to make sure that it makes the inequality true. Answers anyone???Hurry by . Figure the density of the liquid in each beaker: The mass and volume of each liquid have been given in Table 1. Using the formula for density and a calculator, figure the density of each liquid and record it in the density column of Table 1. Round and write your answer out to the nearest hundredth. (This means you will have two numbers after the decimal point.) Don't forget to write the units!!!!!! (Hint: The formula was the answer to #2 on the front page.)