29. Write a program in a script file that calculates the cost of renting a car according to the following price schedule: The program asks the user to enter the type of car (sedan or SUV), the number of days, and the number of miles driven. The program then displays the cost (rounded to cents) for the rent. Run the program three times for the following cases: (a) Sedan, 10 days, 769 miles. (b) SUV, 32 days, 4,056 miles. (c) Sedan, 3 days, 511 miles.

Answers

Answer 1

Answer:The price for renting a car at a car rental company is according to the following schedule: Write a MATLAB program in a script file that calculates the cost of renting a car based on the shown price schedule. The program must ask the user to enter the type of car (Sedan or SUV), the number of days, and the number of miles driven. The program then displays the cost (rounded to cents) for the rent in a sentence that reads: "The cost of the rent is XXX $." where XXX is the cost value in $. Run the program three times for the following cases: Sedan, 10 days, 769 miles. SUV, 32 days, 4, 056 miles. Sedan, 3 days, 511 miles. Use fprintf () to display the text and data. The data should be displayed in f format with two decimal digits.

Explanation:


Related Questions

22. The Disc Drive is also known as the:

Answers

Answer:

HDD Hard Disk Drive

Explanation:

Wesley purchased a word-processing software program. He used it for a year, during which he got regular updates every two months. After a year, he was not allowed to update the software. However, he could continue using it. Why did the updates stop?

Answers

Group of answer choices.

A. The software was corrupt and resulted in a bug.

B. He purchased a license with maintenance for a year.

C. The organization discontinued the software.

D. He purchased an open-source license.

E. He purchase a perpetual non-maintenance license.

Answer:

B. He purchased a license with maintenance for a year.

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.

Basically, softwares are categorized into two (2) main categories and these are;

I. Open-source software.

II. Proprietary software.

A proprietary software is also known as a closed-source software and it can be defined as any software application or program that has its source code copyrighted and as such cannot be used, modified or distributed without authorization from the software developer. Thus, it is typically published as a commercial software that may be sold, licensed or leased by the software developer (vendor) to the end users with terms and conditions.

In this scenario, Wesley purchased a word-processing software program. He used it for a year, during which he got regular updates every two months. However, after a year, he was not allowed to update the software but he could continue using it.

This ultimately implies that, Wesley purchased a licensed software with maintenance for a year and as such he would stop receiving an update from the software developer after his subscription expired.

8.10 Code Practice: Question 2
Edhesive

Answers

Answer:vocab = ["Libraries", "Bandwidth", "Hierarchy", "Software", "Firewall", "Cybersecurity","Phishing", "Logic", "Productivity"]

print (vocab)

for i in range (1, len (vocab)):

   count = i - 1

   key = vocab[i]

   while (vocab[count] > key) and (count >= 0):

       vocab[count+1] = vocab[count]

       count -= 1

       vocab [count+1] = key

       print(vocab)

Explanation: bam baby

In this exercise we have to use the knowledge of the python language to write the code, so we have to:

The code is in the attached photo.

So to make it easier the code can be found at:

vocab = ["Libraries", "Bandwidth", "Hierarchy", "Software", "Firewall", "Cybersecurity","Phishing", "Logic", "Productivity"]

print (vocab)

for i in range (1, len (vocab)):

  count = i - 1

  key = vocab[i]

  while (vocab[count] > key) and (count >= 0):

      vocab[count+1] = vocab[count]

      count -= 1

      vocab [count+1] = key

      print(vocab)

See more about python at brainly.com/question/26104476

Create a program which takes two integers as input from the command line. In your code, allocate space for a 2D array dependent on user input. For example, if they enter 30 40 then your program should allocate space using double **. Once the memory is allocated, initialize the data by setting the value at index (i, j) equal to its position a

Answers

Answer:

In C:

#include <stdio.h>

#include <stdlib.h>

int main() {

int r,c;

printf("Row: "); scanf("%d", &r);

printf("Cols: "); scanf("%d", &c);  

double *myarr = (int *)malloc(r * c * sizeof(int));

double inputs = 0.0;

for (int rww = 0; rww < r; rww++){

for (int ccl = 0; ccl < c; ccl++){

 inputs= inputs+1.0;

 *(myarr + rww*ccl + ccl) = inputs; }}

return 0;}

Explanation:

This declares the rows and columns as integers

 int r,c;

This gets the number of rows

printf("Row: "); scanf("%d", &r);

This gets the number of columns

printf("Cols: "); scanf("%d", &c);  

This dynamically allocate space for array myart

double *myarr = (int *)malloc(r * c * sizeof(int));

This initializes the inputs to the array to 0.0

double inputs = 0.0;

This iterates through the array and initializes each element of the array by its index

for (int rww = 0; rww < r; rww++){

for (int ccl = 0; ccl < c; ccl++){

 inputs= inputs+1.0;

 *(myarr + rww*ccl + ccl) = inputs; }}

there is a structure called employee that holds information like employee code, name, date of joining. Write a program to create an array of the structure and enter some data into it. Then ask the user to enter current date. Display the names of those employees whose service is 15 or more than 15 years according to the given current date.

Answers

Answer:

The program in C is as follows:

#include<stdio.h>

#include<conio.h>

struct employee{

char empname[50]; int empcode, day,mon,yr;

}employees[30];

int main(){

int total;

printf("Numbers of Employees : "); scanf("%d",&total);

for(int kt=0;kt<total;kt++){

printf("Employee Code : "); scanf("%d",&employees[kt].empcode);

printf("Name: "); scanf("%s",employees[kt].empname);

printf("Date of Joining [dd mm yyyy]: "); scanf("%d%d%d",&employees[kt].day,&employees[kt].mon,&employees[kt].yr); }

int year;

printf("\nCurrent Date [Year only]: "); scanf("%d", &year);

printf("Code\t\t\t Name\t\t\t Date of Joining\n");

for(int kt=0;kt<total;kt++)

if((year - employees[kt].yr) >= 15)

printf("%d\t\t\t %s\t\t\t %d/%d/%d\n",employees[kt].empcode,employees[kt].empname, employees[kt].day,employees[kt].mon,employees[kt].yr);

}

Explanation:

See attachment for explanation where comments were used to explain some lines

In the garden, the ratio of roses to daisies is 2:5. There are 40 roses. How many daisies are there?
help me plz
thx if you do

Answers

Answer: There are 16 daisies.

Explanation: In order to find this number, multiply 5 by 8. This will get you 40. Then, multiply 2 by 8. This will get you 16. Hope this helps. :)

Create a class called Jack that extends Leo. This class must have the following behaviors/methods. You must use the inheritance to reuse the methods from the parent classes. Solution without using the inheritance will get zero points. re-writting the code that already exists will get zero credit. A call to the methods in the parent classes must be donemethod description
method1 display "Jack 1 Leo 1 "
method2 displays "Don 2 Jack 2"
method3 displays "Jack 3 Leo 3 Don 2 "
toString displays" Jack 3 Leo 1"

Answers

Answer:

public class Leo{

public String method1(){

return "Jack 1 Leo 1";

}

public String method2(){

return "Don 2 Jack 2";

}

public String method3(){

return "Jack 3 Leo 3 Don 2";

}

public String toString(){

return "Jack 3 Leo 1"

}

}

public class Jack extends Leo{

}

Explanation:

Leo is the parent class and jack inherits all of its attributes from Leo

So when you call the following code in the main method:

Jack j = new Jack();

System.out.println(j.method1);

it should print Jack 1 Leo 1

This is because the program first checks if method 1 exists in the Jack class

Because it doesn't exist it then goes to the parent class which is Leo.

And in the Leo class method1 displays "Jack 1 Leo 1 "

So it prints that

____ occurs when weaker companies are eliminated and the strong companies survive

Answers

Answer:

sounds like a monopoly but is there a word bank?

Explanation:

"the exclusive possession or control of the supply of or trade in a commodity or service."-Oxford dictionary

You should always keep a backup of data stored in the cloud because the cloud provider does not automatically do this True or false???

Answers

Answer:

False

Explanation:

Assume that the final grade for a course is determined based on this scale - A: 900 points, B: 800-899 points, C: 700-799 points, D: 600-699 points, F: 599 or fewer points. Write a function named get_letter_grade() that takes the number of points the student has earned as a parameter. It should return a string containing (only) the letter grade the student will receive.

Answers

Answer:

In Python:

def get_letter_grade(points):

   if points>=900:

       grade ="A"

   elif points>=800 and points < 900:

       grade ="B"

   elif points>=700 and points < 800:

       grade ="C"

   elif points>=600 and points < 700:

       grade ="D"

   else:

       grade = "F"

   return grade

Explanation:

This defines the function

def get_letter_grade(points):

The following if-else if conditions check the score to determine the appropriate grade

   if points>=900:

       grade ="A"

   elif points>=800 and points < 900:

       grade ="B"

   elif points>=700 and points < 800:

       grade ="C"

   elif points>=600 and points < 700:

       grade ="D"

   else:

       grade = "F"

This returns the grade

   return grade

Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (currentPrice * 0.051) / 12 (Note: Output directly. Do not store in a variable.). Ex: If the input is: 200000 210000 the output is: This house is $200000. The change is $-10000 since last month. The estimated monthly mortgage is $850.0. Note: Getting the precise spacing, punctuation, and newlines exactly right is a key point of this assignment. Such precision is an important part of programming.

Answers

Answer:

In Python:

cprice= int(input("Current price: "))

lmonth= int(input("Last month's price: "))

print("This house is $"+str(cprice))

print("The change is $"+str(cprice-lmonth)+" since last month")

print("The current mortage $"+str((cprice * 0.051) / 12)+" since last month")

Explanation:

Get current price

cprice= int(input("Current price: "))

Get last month's price

lmonth= int(input("Last month's price: "))

Print the current price

print("This house is $"+str(cprice))

Print the change

print("The change is $"+str(cprice-lmonth)+" since last month")

Print the mortgage

print("The current mortage $"+str((cprice * 0.051) / 12)+" since last month")

Which of these is NOT an Al technology?
a. Facial recognition
b. Nature
c. Robotics
d. Animat
the only thing that computers ur​

Answers

Explanation:

The answer is B since facial recognition uses cameras that scan who you are. Robotics is controlled by someone with a remote or a simple command.

Which type of software is for sale directly to consumers in stores and online?
A. demo software
B. OEM software
C. public software
D. retail software

Answers

Answer: its b my guy

Explanation:

Imagine a room full of boxes. Each box has a length, width, and height. Since the boxes can be rotated those terms are inter- changeable. The dimensions are integral values in a consistent system of units. The boxes have rectangular surfaces and can be nested inside each other. A box can nest inside another box if all its dimensions are strictly less than the corresponding dimensions of the other. You may only nest a box such that the corresponding surfaces are parallel to each other. A box may not be nested along the diagonal. You cannot also put two or more boxes side by side inside another box.The list of boxes is given in a file called boxes.txt. The first line gives the number of boxes n. The next n lines gives a set of three integers separated by one or more spaces. These integers represent the 3 dimensions of a box. Since you can rotate the boxes, the order of the dimensions does not matter. It may be to your advantage to sort the dimensions in ascending order.boxes.txt contains:2023 90 70 48 99 56 79 89 91 74 70 91 91 53 56 22 56 39 64 62 29 92 85 15 23 61 78 96 51 52 95 67 49 93 98 25 57 94 82 95 93 46 38 50 32 50 89 27 60 66 60 66 43 37 62 27 14 90 40 16 The output of your code will be the largest subset of boxes that nest inside each other starting with the inner most box to the outer most box. There should be one line for each box.Largest Subset of Nesting Boxes(2, 2, 3)(3, 4, 4)(5, 5, 6)(6, 7, 9)If there is two or more subsets of equal lengths that qualify as being the largest subset, then print all the largest qualifying subsets with a one line space between each subset. The minimum number of boxes that qualify as nesting is 2. If there are no boxes that nest in another, then write "No Nesting Boxes" instead of "Largest Subset of Nesting Boxes".For the data set that has been given to you, here is the solution set:Largest Subset of Nesting Boxes[14, 27, 62][16, 40, 90][53, 56, 91][57, 82, 94][14, 27, 62][27, 50, 89][53, 56, 91][57, 82, 94][14, 27, 62][37, 43, 66][53, 56, 91][57, 82, 94][22, 39, 56][27, 50, 89][53, 56, 91][57, 82, 94][22, 39, 56][37, 43, 66][53, 56, 91][57, 82, 94][32, 38, 50][37, 43, 66][53, 56, 91][57, 82, 94]

Answers

umm have fun with that....

The Zoom feature allows you to either increase or decrease the size of your document on the screen,
Please select the best answer from the choices provided
True or false

Answers

The answer will be (True) hope this helps!


Have a wonderful day!

Compare and contrast the advantages and disadvantages of the windows, apple and linux operating systems?

Answers

The comparison among windows, apple, and Linux operating systems are they provide is windows is the most popular among these operating systems.

What are Windows, apple, and Linux operating systems?

Linux is completely open-source, unlike Windows and macOS, so it may be altered and personalized. There are numerous variations, sometimes known as distributions because it is open-source.

You can perform tasks that Windows cannot perform. However, Windows is also good because it offers more features than Apple.

Therefore, the comparison between the operating systems Windows, Apple, and Linux shows that Windows is the most widely used of them.

To learn more about the operating system, refer to the link:

https://brainly.com/question/30214837

#SPJ1

please help me on this coding assignment i need to finish it today :)
Assume that a, b, and c are variables of type int. Consider the following three conditions.

I.
(a == b) && (a == c) && (b == c)
II.
(a == b) || (a == c) || (b == c)
III.
((a - b) * (a – c) * (b – c)) == 0
Which of the conditions above evaluates to true given that at least two among the variables a, b, and c are equal?

II and III
I only
I and II
III only

Answers

Answer:

II and III

Explanation:

(i) would only evaluate to true if all variables are equal.

(ii) evaluates to true if one or more of the clauses is true.

(iii) if two variables are equal, at least one factor will evaluate to 0, making the result of the multiplication zero and thus the expression true.

Which term best describes these lines?

count = 0

loop through list

if “basketball” is found

add one to count

output count

Python 3 code
selection program
pseudocode
sequential program

Answers

The term best describing these lines is called pseudocode. Essentially a “text-based” detail (algorithmic) design tool.

Consider the method get Hours, which is intended to calculate the number of hours that a vehicle takes to travel between two mile markers on a highway if the vehicle travels at a constant speed of 60 miles per hour. A mile marker is a sign showing the number of miles along a road between some fixed location (for example, the beginning of a highway) and the current location. IN The following table shows two examples of the intended behavior of getHours, based on the int parameters markeri and marker2. marker1 marke 100 220 100 700.5 Consider the following implementation of getHours. public static double getHours (int markeri, int ON 20 | 2 15. . . e no E /* missing statement */ return hours; Which of the following statements can replace /* missing statement */ so getHours works as intended?
(A) double hours = (Math.abs (markerl) - Math.abs (marker2)) / 60.0;||
(B) double hours = Math.abs (markeri - marker2 / 60.0)
(C) double hours = Math.abs (marker1 - marker2) / 60.0;
(D) double hours = Math.abs((markeri - marker2) / 60);
(E) double hours = (double) (Math.abs (marker1 - marker2) / 60);

Answers

Answer:

Replace the comment with:

(c) double hours = Math.abs (marker1 - marker2) / 60.0;

Explanation:

See attachment for right presentation of question

Analyzing the options:

(a): May return a negative result

This option will return a negative value if marker1 is less than marker2 because it subtracts the absolute value of marker2 from the absolute value marker1.

This literally is not different from marker1 - marker2

(b): Incorrect expression

This divides only marker2 by 60, then subtracts the quotient from marker1. This is not the expected expression.

(c) This option is correct

This correctly calculate the positive difference between marker1 and marker2 and the result is divided by 60.0 (note 60.0 not 60)

(d) & (e) Integer division

When a variable declared as double is divided by an integer variable or value, the result of the computation is not always accurate due to approximation

Subtraction + Decision and Loop
This is a twist on the previous exercise that will help you review loops and decision structures. You will again ask the user to enter two numbers. However, you will ALWAYS subtract the smaller number from the larger number to ensure that you never get a negative number for an answer. You do this by checking the numbers and switching them if they are not in the right order (larger then smaller). All of this checking, switching, subtracting, and output of the answer should occur in a function.
((( THIS WAS THE PREVIOUS EXERCISE
Function Basics - Arguments and Parameters
This is another easy exercise to test your knowledge of the fundamentals. In main(), ask the user to enter two integers. Pass those two integers to a function that will subtract one number from another. This function must also output the answer to the user.
Output:
Enter two integers (separated by a space) and this program will subtract them: [user enters: 5 7]
5 - 7 = -2
Notes and Hints:
1) From now on, you must use a function prototype for all programs that use functions. Don't expect me to ask for it in each exercise. )))
Finally, ask the user if they would like to run the program again. By now, you should know exactly what type of loop to use.
Output:
Enter two integers (separated by a space) and this program will subtract the smaller from the larger: [user enters: 7 5]
7 - 5 = 2
Do you want to run this program again? [user enters: y]
Enter two integers (separated by a space) and this program will subtract the smaller from the larger: [user enters: 5 7]
7 - 5 = 2
Do you want to run this program again? [user enters: n]
Notes and Hints:
1) As always, make sure you accept an upper or lower case 'Y'

Answers

Answer:

In Python:

def subsmall(num1,num2):

   if num1 > num2:

       return num1 - num2

   else:

       return num2 - num1

   

repeat = True

while(repeat):

   num = input("Enter two integers: ")

   nums = num.split(" ")

   print(subsmall(int(nums[0]),int(nums[1])))

   runagain = input("Run program again? ").lower()

   if  runagain == "y":

       repeat=True

   else:

       repeat = False

Explanation:

The function begins here

def subsmall(num1,num2):

This subtracts num2 from num1 if num2 is smaller

   if num1 > num2:

       return num1 - num2

If otherwise, subtract num1 from num2

   else:

       return num2 - num1

The main begins here

This initialiazes a boolean variable to true    

repeat = True

This loop is repeated until the boolean variable is false

while(repeat):

Prompt to enter two integers

   num = input("Enter two integers: ")

Split the string by space

   nums = num.split(" ")

This passes the two integers to the function and also prints the differences

   print(subsmall(int(nums[0]),int(nums[1])))

Prompt to run the program again

   runagain = input("Run program again? ").lower()

If input is Y or y, the loop repeats

   if  runagain == "y":

       repeat=True

The program ends if otherwise

   else:

       repeat = False

evaluate the arithmetic expression 234 + 567​

Answers

Answer:

801

Explanation:

234 + 567 = 801

Aliah finds an old router that does not support channel bonding. What frequency are the channels limited to?

A.
10 MHz
B.
20 MHz
C.
40 MHz
D.
80 MHz

Answers

A because it’s slower

Select all the correct answers.
Mark is unable to connect to the internet or to any of the computers on his network, while nearby computers don’t have this problem. Which three issues could be causing the problem?

slow transmission of data
improper cable installation
faulty software configuration
interference between the signals on cables close to each other
improper connection of a network cable to the jack

Answers

Answer:

I. Improper cable installation.

II. Interference between the signals on cables close to each other.

III. Improper connection of a network cable to the jack

Explanation:

The standard framework for the transmission of informations on the internet, it is known as the internet protocol suite or Transmission Control Protocol and Internet Protocol (TCP/IP) model. Thus, the standard Internet communications protocols which allow digital computers to transfer (prepare and forward) data over long distances is the TCP/IP suite.

In this scenario, Mark is unable to connect to the internet or to any of the computers on his network, while nearby computers don’t have this problem. Therefore, the three issues which could be causing the problem are;

I. Improper cable installation: this involves not installing the ethernet cable in the correct destination port.

II. Interference between the signals on cables close to each other: interference usually results in the disruption in network signals.

III. Improper connection of a network cable to the jack: the right connectors such as RJ45 should be used.

Who likes virtual if you do what do you like about ot

Answers

Virtual is chill cuz I don’t have to wake up at 5am for in person

Answer:

Explanation:

I do not like virtual because I like to go outside.

PLEASE QUICK IM TIMED.
Write a program that assigns the value 14 to a variable. Then print out the type of the variable. What will the output of the program be?

Answers

This is for Python

Code:

variable = 14

print(type(variable))

Output:

<class 'int'>

function _one(array)
Create a JavaScript function that meets the following requirements:




Please give your function a descriptive name
o ( _one is not acceptable, and is only displayed here for illustration purposes)
Receives an array of integers as an argument
The function removes all duplicates (if they exist) from the array and returns it to the caller.
Assume the input array parameter will have at least one element in it.
Examples :
_one([33])
➔ [33]
_one([33, 33, 1, 4])
➔ [1, 4]
_one([33, 33, 1, 4, 1]) ➔ [4]​

Answers

Answer:

function removeRepeaters(list){

   var goodList = [], badList = {}, used = {}, n;

   // ensure that the argument is indeed an array

   if(!Array.isArray(list)){

        throw "removeRepeaters: Expecting one argument of type Array";

   }

   // loop through the array and take note of any duplicates

   for(n in list) used[list[n]] == true ? badList[list[n]] = true : used[list[n]] = true;

   // now loop through again, and assemble a list of non-duplicates

   for(n in list) if(badList[list[n]] == undefined) goodList[] = list[n];

   return goodList;

}

Explanation:

I assume you're familiar with trinary operators, but just in case, that's what's happening in this first for loop:

for(n in list) used[list[n]] == true ? badList[list[n]] = true : used[list[n]] = true;

this is the same as saying:

for(n in list){

   if(used[list[n]] == true){

       badList[list[n]] = true;

   } else {

       used[list[n]] = true;

   }

}

This loop flags all of the values in the list that are duplicated.  Note that both "badList" and "used" are declared as objects instead of arrays.  This allows us to compare keys in them with an == operator, even if they're not defined, making it a convenient way to flag things.

Note that I haven't tested it, so I may have overlooked something.  I suggest testing it before handing it in.

what are the main technologies that have contributed to the growth and commercialization of the internet .​

Answers

Answer:

Explanation: The main forces that led to the commercialization of the internet are its demand and the importance of the Internet.

TCP and IP technologies allowed for the connection of many networks to form on large network. This tech used packets and provided error-recovery mechanisms. Hence many small networks were combined to form the internet.

There are several technology of the Internet and the World Wide Web. The hand of projects in computer networking, mostly funded by the federal government.

The projects made communications protocols that shows the format of network messages, prototype networks, and application programs such as browsers.

The advent of computer devices and telephone network was the underlying physical infrastructure upon which the Internet was built. The commercialization and exponential growth of the internet started in the early 1990s.

It was due to high meetup of technologies, including the development of personal computers with graphical operating systems, widespread availability of internet connection services, the removal of the restriction of commercial use on NSFnet, etc.

Conclusively, These happenings combined to give the commercial push for an easy way to share and access information.

Learn more from

https://brainly.com/question/22600646

what is the structure of an HTML document. pls answer I don't want any links pls explain too  ​

Answers

Answer:

What is a HTML document?

It's a text document saved with the extension . html or . htm that contains texts and some tags written between "< >" which give the instructions needed to configure the web page. These tags are fixed and definite and will be currently explained in the tutorials when applied and needed.

What is HTML structure?

An HTML Document is mainly divided into two parts: HEAD: This contains the information about the HTML document. For Example, Title of the page, version of HTML, Meta Data etc. BODY: This contains everything you want to display on the Web Page.

What is the basic structure of HTML template?

An HTML document has two* main parts: head. The head element contains title and meta data of a web document.

How is an HTML document structured?

An HTML 4 document is composed of three parts: a line containing HTML version information, a declarative header section (delimited by the HEAD element), a body, which contains the document's actual content.

Explanation :

HELLOOOO ARMY! HOPE U HAVE A WONDERFUL DAY! MAY NAMJESUS BLESS U !

Stream life goes on and dynamite we are about o reach 1B!

And trend these hashtags:

#Westankings

#scammys

AND FINALLY , SARANGAE BOROHAEEE!!!

Explanation:

An HTML Document is mainly divided into two parts: HEAD: This contains the information about the HTML document. For Example, Title of the page, version of HTML, Meta Data etc. BODY: This contains everything you want to display on the Web Page.

for java ?(Business: check ISBN-13)ISBN-13 is a new standard for identifying books. It uses 13 digits d1d2d3d4d5d6d7d8d9d10d11d12d13. The last digit d13 is a checksum, which is calculated from the other digits using the following formula:10 - (d1 + 3d2 + d3 + 3d4 + d5 + 3d6 + d7 + 3d8 + d9 + 3d10 + d11 + 3d12) % 10If the checksum is 10, replace it with 0. Your program should read the input as a string.Display "invalid input" if the input is incorrect.Sample Run 1Enter the first 12 digits of an ISBN-13 as a string: 978013213080The ISBN-13 number is 9780132130806Sample Run 2Enter the first 12 digits of an ISBN-13 as a string: 978013213079The ISBN-13 number is 9780132130790Sample Run 3Enter the first 12 digits of an ISBN-13 as a string: 9780132097801320 is an invalid inputClass Name: Exercise05_47

Answers

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 String isbn;

 System.out.print("First 1:2 digits: ");

 isbn = input.nextLine();

 if(isbn.length()==12){

 int chksum = 0;

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

     if((i+1)%2==0){      chksum+= 3 * Character.getNumericValue(isbn.charAt(i));          }

     else{          chksum+=Character.getNumericValue(isbn.charAt(i));          }  }

 chksum%=10;

 chksum=10-chksum;

 if(chksum==10){

 System.out.print("The ISBN-13 number is "+isbn+"0");}

 else{

 System.out.print("The ISBN-13 number is "+isbn+""+chksum);          }   }

 else{

     System.out.print("Invalid Input");

 }     }}

Explanation:

See attachment for explanation where comments are used to explain each line

Deidre is studying for a history exam. She reads the chapter in her textbook that covers the material, then realizes she needs to learn the names, dates, and places mentioned in the reading.

Which note-taking tool will help Deidre quickly find the names, dates, and places later when it is time to review?

a sticky note
a highlighter
electronic notes
flash cards

Answers

Answer:

B: Highlighter

Explanation:

Just answered on edge, hope this helps

Answer: B) A Highlighter

Explanation:

Other Questions
PLEASE EMERGENCY THAN YOU Text 1: Pot O Gold by Kathryn FitzgeraldWe came here in search of foodacross a tumultuous seaWe came here for a life thats good;We'd have stayed home if we couldMthair cried after we arrivedEach day in the filth she would toilAthaird search each day for a wage that was goodto buy food, to buy shoes, to buy woodThey fought long and hard, became loyal and trueTo forge a life from something brand newThis immigrants legacy would be seen throughPulsing through my heart is emerald bloodMy grandfather's fathers will, in meThey came here for a life thats goodI stay here because I could.Text 2: Mrs. Olney stood abashed a moment. Well, my dear, she said deliberately, what would you like to take up?I got ideas how to make America better, only I dont know how to say it out. Aint there a place I can learn?A startled woman stared at me. For a moment not a word came. Then she proceeded with the same kind smile. Its nice of you to want to help America, but I think the best way would be for you to learn a trade. Thats what this school is for, to help girls find themselves, and the best way to do is to learn something useful.Aint thoughts useful? Does America want only the work from my body, my hands? Aint it thoughts that turn over the world?Ah! But we dont want to turn over the world. Her voice cooled. My child, thought requires leisure. The time will come for that. First you must learn to earn a good living.Did I come to America for a living?What did you come for?I came to give out all the fine things that was choked in me in Russia. I came to help America make the new world. . . . They said, in America I could open up my heart and fly free in the airto singto danceto liveto love . . . Here I got all those grand things in me, and America wont let me give nothing.1. How is the idea of the American Dream, coming to America for a better life, different in passage 1 than in passage 2?A-In Passage One, they choose to stay while in Passage Two, she wants to leave. B-Passage One is about working hard in America, while Passage Two is about changing America. C-The narrator in Passage Two is ungrateful, while Passage 1 is grateful. D-Passage Two doesnt care about money, but Passage 2 does. 2) The speaker of the poem would disagree with the narrator of the poem because..A-The speaker likes America. B-The speaker thinks the narrator is stuck up. C-The speaker works hard for her money. D-Theyd be friends. 3) Both passages discuss the theme of....A-ImmigrationB-America being great again C-LonelinessD-Hard work Fill in the blank The skills and content of several subject areas were combined to form a new field known as a meta ______. Determine the equation of the line based on the graph.(write in slope-intercept form)Submit what is the answer to this -4(x-5)=2(2x+10) solve for x and show work plz HELP PLEASE BRAINLIEST AND 20 POINTS TO THE FIRST PERSON WHO ANSWERS AND IS CORRECT!Which is NOT and objective summary of a fiction text?A. The only parent worse than Mary's mother, Mrs. Lennox, is her uncle, Mr. Craven.B. Dickon is only "a common moor boy" but Mary considers him an angel.C. Mary soon finds the key to the garden buried in the earth and unlocks the door.D. Mary is surprised and delighted the first time the robin twitters at her. find the value of given expression[tex] \sqrt{65 \times 65} [/tex] What did the southerners threaten to do after California applied for statehood as a non-slave state? "You are not helping," Alicia shrieked.Ron was driving the boat, and he clearly knew what he was doing. He had been running boats, working crab traps since Alicia was old enough to notice such things. Still, she wasn't sure she trusted him to tell her the truth about things. She was younger, and he liked to tease. She often found herself soaking wet from a dunk, or the loser in a game he'd "forgotten" to explain the rules for. She loved him nonetheless. He brought her treasures from his traps. He told her stories of strange creatures he'd seen in the salt marshes."Seriously," Ron continued, slowing the boat down, "they can't really hurt you. It's just a bivalve.""Bivalve means 'two valves,'" Alicia said, "but that doesn't tell me anything about how hard they bite." Spray from the waves speckled Alicia's back and shoulder. She had turned to talk to Ron, but she also was enjoying a break from getting the spray in her face. It was a warm sunny day, but Alicia knew if the wind picked up she could get chilled."Look, it's not going to hurt if you get bitten," Ron said, taking her seriously now. "If you just pick them up from the back you won't have any trouble. Shoot, you pick up crabs all the time and they have a much more painful pinch than a scallop.""Well, there's a bigger place to put my hand on a crab. Scallops are petite.""And squirty," Ron added. "You know they move by pushing water through their shell? But seriously, sis, they move slowly. They will be snuggled down in the sea grass when you see them and won't go far if they do move. You'll be fine. Now climb up on the bow, look out in the shallows, and see if you can see any."Ron had slowed the boat to an almost idle speed. Up ahead Alicia could see many boats anchored on the shallow flats. People walking around the boats would bend every now and then to pick something up from the water. It looked like a small city on the water, with people milling about waiting for a movie to start or a party to begin.Alicia climbed up to the front of the boat and looked out over the sea grass flats. The water was just a few feet deep, and she could see the dark green blades of sea grass swaying as the waves gently washed across the shallows. The boat moved slowly, and Alicia saw shells scattered here and there and sea urchins with their spiny red orbs. Small translucent fish darted away.She had only seen pictures of scallops, but when she saw the first brown shell tucked into a clump of sea grass she knew immediately what it was."I see one," she yelled, pointing."That's great," Ron yelled back. "Wait till you see a lot more than just one. It's not worth stopping for one."Alicia continued looking, scanning first one side of the boat then the other. She saw a stingray dash away, patches of gleaming white sand here and there, and another few sea urchins. Then suddenly, as if they had passed into a new world, scallops were everywhere. Every few feet on both sides of the boat she saw them. Waving her hand at Ron, she turned and got ready to drop the anchor."Here," she said. "Right here is perfect."Ron cut the motor and Alicia dropped the anchor off the bow. She turned. Ron had already put on his tennis shoes and was putting sunblock on his face. He threw the sunblock in her direction, and threw a leg over the side of the boat."Get your shoes on. There's a mesh bag on the seat for you. Use that to collect your scallops. We'll put them in the cooler when the bags get full."Alicia slipped out of the boat a few minutes after Ron. The ground under her feet was squishy but solid; the sea grass brushed her legs. Spotting a nearby scallop, she walked slowly over, reached down-water up to her elbow-and touched its shell. Sure it would squirt away, she was surprised when nothing happened at all. Reaching behind and underneath it, she lifted the scallop out of the water and up to her face to look more closely. The top shell was dark green, almost brown, with tiny barnacles here and there. The bottom shell was white and smooth."Told ya," Ron yelled at her from the other side of the boat. "It's super easy."Just then the scallop she was holding opened its shell slightly. Alicia saw a row of iridescent blue dots among what looked like frilly whiskers. Was it looking at her?Suddenly she felt the scallop contract in her hand. Its shell clamped shut, and water squirted out of it. Right into her face."Ahhh," she screamed, dropping the scallop and hearing Ron's hoots of laughter behind her."And there, dear sister, is the scallop's bite. Do be careful," Ron said, laughing harder.Alicia had to grin as her brother's laugh grew louder. "I'll take a squirt in the face any day over a bite," she said bending to retrieve the dropped bivalve. It was going to be a good day.The author spends a lot of time describing what Alicia sees. What do you think is the main purpose of this detail? Be sure to use the text to support your answer. (5 points) What molecule are we testing for to determine if the milk was properly digested?Question 11 options:galactoselactaseglucoselactose Read the following sentence:Tonya had a bandage on her finger because she had hurther finger in some way.In what way does this sentence overexplain its meaning?A. Tonya wears a bandage, so the reader wonders what happened toher.B. Tonya has a bandage, so the reader knows that she has hurt herfinger.C. Tonya is always getting hurt, so the reader assumes she has aninjury.D. Tonya seldom wears bandages, so the reader feels worried abouther. What is the founder of 100 and 2,009 24. BLOCKS Building blocks are in the shape of a cube. The dimensions of the building blocks are based on the length of the packaging box, which is defined as x centimeters, where x is the length of the packaging box. What is the volume of a building block in terms of x? What is the distance between -2 1/2, 4 1/2 and 4 3/4, 4 1/2A. 2 1/4 unitsB. 4 1/2 unitsC. 7 1/4 unitsD. 9 1/4 unitsPlease help this is due tomorrow :( Un sure on this if someone could answer would be great ! Create an argument to answer your compelling question. Cite at least three pieces of evidence from your research. Make sure to use reasoning to support your argument. How are progression and varlation similar?A.Both state that changes in ia routine are necessary for consistent gains.O B.Bothstate that using a repetitive routine is necessary for best gains.O C. Both represent major components of the FITT principle.O D. Both are primarilly used as Injury-prevention methods. Shortest leadership term of a leader ( any country) group of adjacent nucleic acids are a. phosphodiester bond b. peptide bonds c. lnoic bond d. covalent bonds