Write a program that uses the function strcmp() to compare two strings input by the user. The program should state whether the first string is less than, equal to, or greater than the second string7. Write a program that uses the function strcmp() to compare two strings input by the user. The program should state whether the first string is less than, equal to, or greater than the second string

Answers

Answer 1

user_str1 = str ( input ("Please enter a phrase: "))

user_str2 = str ( input("Please enter a second phrase: "))

def strcmp (word):

user_in1 = int (len(user_str1))

user_in2 = int (len(user_str2))

if user_in1 > user_in2:

return "Your first phrase is longer"

elif user_in1 < user_in2:

return "Your second phrase is longer"

else:

return "Your phrases are of equal length"


Related Questions

A test for logical access at an organization being audited would include: Group of answer choices Checking that the company has a UPS and a generator to protect against power outages Making sure there are no unmanaged third-party service level agreements Performing a walkthrough of the disaster recovery plan Testing that super user (SYSADMIN) access is limited to only appropriate personnel

Answers

Answer:

Testing that super user (SYSADMIN) access is limited to only appropriate personnel.

Explanation:

A test for logical access at an organization being audited would include testing that super user (SYSADMIN) access is limited to only appropriate personnel.

Write a program that takes a date as input and outputs the date's season. The input is an integer to represent the month and an integer to represent the day. Ex: If the input is: 4 11 the output is: spring In addition, check if both integers are valid (an actual month and day). Ex: If the input is: 14 65 the output is: invalid The dates for each season are: spring: March 20 - June 20 summer: June 21 - September 21 autumn: September 22 - December 20 winter: December 21 - March 19

Answers

Answer:

Explanation:

The following program is written in Java. It is a function that takes in the two parameters, combines them as a String, turns the combined String back into an integer, and uses a series of IF statements to check the parameters and determine which season it belongs to. Then it prints the season to the screen. The code has been tested with the example provided in the question and the output can be seen in the attached image below.

class Brainly {

   public static void main(String[] args) {

       getSeason(4, 65);

       getSeason(4, 11);

   }

   public static void getSeason(int month, int day) {

       String combined = String.valueOf(month) + String.valueOf(day);

       int combinedInt = Integer.parseInt(combined);

       if ((month > 0 && month < 12) && (day > 0 && day < 31)) {

           if ((combinedInt >= 320) && (combinedInt <= 620)) {

               System.out.println("The Season is Spring");

           } else if ((combinedInt >= 621) && (combinedInt <= 921)) {

               System.out.println("The Season is Summer");

           } else if ((combinedInt >= 922) && (combinedInt <= 1220)) {

               System.out.println("The season is Autumn");

           } else {

               System.out.println("The Season is Winter");

           }

       } else {

           System.out.println("Invalid date");

       }

   }

}

Which of the following BEST describes an inside attacker?
An agent who uses their technical knowledge to bypass security.
An attacker with lots of resources and money at their disposal.
A good guy who tries to help a company see their vulnerabilities.
An unintentional threat actor. This is the most common threat.​

Answers

The inside attacker should be a non-intentional threat actor that represents the most common threat.

The following information related to the inside attacker is:

It is introduced by the internal user that have authorization for using the system i.e. attacked.It could be intentional or an accidental.So it can be non-intentional threat.

Therefore we can conclude that The inside attacker should be a non-intentional threat actor that represents the most common threat.

Learn more about the threat here: brainly.com/question/3275422

A computer has many resources. A resource can be memory, disk drive, network bandwidth, battery power, or a monitor. It can also be system objects such as shared memory or a linked list data structure. This principle is based in object-oriented programming (OOP). In OOP, a class definition encapsulates all data and functions to operate on the data. The only way to access a resource is through the provided interface. Which security principle are we referring to

Answers

Answer:

The security principle being referred to here is:

Resource Encapsulation.

Explanation:

Resource Encapsulation is one of the cybersecurity first principles.  It allows access or manipulation of the class data as intended by the designer. The cybersecurity first principles are the basic or foundational propositions that define the qualities of a system that can contribute to cybersecurity.  Other cybersecurity first principles, which are applied during system design, include domain separation, process isolation, modularization, abstraction, least principle, layering, data hiding, simplicity, and minimization.

5 Major of computer application

Answers

Im assuming you means applications as in Apps.

Microsoft windows
Microsoft internet Explorer
Microsoft office or outlook
Mcafee antivirus
Adobe pdf

Answer:

Basic Applications of Computer

1 ) Home. Computers are used at homes for several purposes like online bill payment, watching movies or shows at home, home tutoring, social media access, playing games, internet access, etc.

2 ) Medical Field.

3 ) Entertainment.

4 ) Industry.

5 ) Education.

Explanation:

Hope it helps you

Mark my answer as brainlist

have a good day

Instructions
Create a multimedia project that contains the text element and all the contents that you have studied about that element

Answers

Answer:

iiiio888887776558777u765

g Add a throw statement to the processNumbers function that throws the message "An element in the list is not a number." if one of the elements in toProcess is not a number. Hint: The function isNaN() returns true if the parameter is not a number.

Answers

Answer and Explanation:

function processNumbers(alist){

var Ourarray= new array(alist);

Ourarray.foreach(

if(isNaN()){

Console.log( "An element in the list is not a number."};

break;

}

}

processNumbers(alist)

From the above, we have defined a function that takes an array parameter(the following array variable will make sure of that). We test each element in the array using foreach array function. The for each function runs the if statement and if isNan is true for each of the elements in the array.

Alexis received an email message from an unknown sender that included an attachment.

If she opens the attachment, what kind of malicious software might be activated, and what are the consequences?


Opening the attachment would release a worm, which would infect her system with a virus.


Opening the attachment would release a worm, which would infect her system with spyware.


Opening the attachment would release an active worm, which would infect her system with adware.


Opening the attachment would release a passive worm, which would infect her system with adware.

Answers

Answer:

Opening the attachment would release a worm, which would infect her system with a virus.

Answer:  B. Opening the attachment would release a worm, which would infect her system with a virus.

3. Coaxial/telephone cable sends
during the data transmission
signal

Answers

Answer:

high frequency signal.

T
N
O
?
You can insert only the row
only to
True or false

Answers

false

Explanation:

good luck bro

have a great day

Answer:

false

Explanation:

e) Point out the errors( if any) and correct them:-
class simple
{
inta,b,c;
double sumNumber
{
int d = a + b + c;
double e = d/5.6;
return e;
}
void show Number()
{
a = 10, b = 20, c=5;
System.out.println(d);
double f = sumNumber(a,b,c);
System.out.print(e);
}
}​

Answers

Explanation:

double e-d/5.6;is wrong it should return to c

3. Which property is used to select full Row of data grid view
a) Select Mode b) Mode Selection c) Selection Mode d) Mode Select

Answers

Answer:

I think a is correct answer.

What do you do if your computer dies/malfunctions? Reboot (Restart) Shut Down Recovery CD and Recover your system Call a person to fix it​

Answers

Answer:

Restart

Explanation:

Simply I may restart my pc if it dies/malfunctions. I'll not restart immediately, I'll wait for an hour and do restart my computer. If it doesn't work then maybe I'll Call a person to fix it.

what is IBM 1401 used for? Write your opinion.​

Answers

Explanation:

The 1401 was a “stored program computer,” allowing programmers to write (and share) applications loaded into the machine from punched cards or magnetic tape, all without the need to physically reconfigure the machine for each task.

Select the scenario that describes a top-down approach to data warehouse design.


Cathy’s Cards and Gifts, which has three stores, creates data marts for its sales, marketing, and delivery departments to study the possibility of establishing a new store.


Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed.


Cynthia’s Florals, which is dealing with debt, creates new data marts for the service, delivery, and sales departments to develop a strategy to stay in business.


Connor’s Meat Market, which just opened, creates data marts to track the sale of each of the following meats: beef, pork, lamb, and fish.

Answers

Answer:

Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed.

The scenario defines a top-down approach to data warehouse design as "Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed".

What is a top-down approach to data warehouse design?

In the "Top-Down" method system, a data warehouse exists defined as a subject-oriented, time-variant, non-volatile, and integrated data storage for the entire business data from various sources exist validated, reformatted, and saved in a normalized (up to 3NF) database as the data warehouse.

Therefore, the correct answer is option b) Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed.

To learn more about warehouse design

https://brainly.com/question/25885061

#SPJ2

Write a program named lastname_firstname_cities.py that works with information about large cities. Your program will open the cities.txt downloadfile. Each line in the file has the name of a city, its country, and its population. The first few lines of the file look like this:

Answers

Answer and Explanation:

Open your text editor and open new file. Save new file file as lastname_firstname_cities.py. The program will open the file cities.txt downloadfile hence :

dfile= open(cities.txt, "r")

If we write this into our lastname_firstname_cities.py file it will open our cities.txt downloadfile in read mode and text mode(by default unless we specify binary mode which is for images)

Write a C program that will load entries from a file containing details of books and prints them.

Program Requirements:
a. Load file containing details of books
b. Print out all the books Required approach:

1. Design a struct/class that can hold the details of an individual book.
2. Dynamically allocate an array of these objects. The size should be the number of book entries from the input file given by the user.
3. Load all of the book entries into this array of objects before printing

Answers

Answer:

........

Explanation:

Explain the purpose of the open() and close() operations.

Answers

Answer:

The open() operation notifies the system that the named file is about to become active. The close() operation notifies the system that the named file is no longer in active use by the user who issued the close operation.

Chất xơ có nhiều trong thực phẩm nào?

Answers

Answer: rau củ quả đều có lượng chất xơ nhiều hơn so với các loại thực phẩn khác

Explanation:

I connected to an external hard drive to transfer some photos from my vacation. When I try to drag the photo, it bounces right back and does not transfer. What is the likely cause of this issue?

a. hard drive is full

b. photos were taken in a different country

c. USB port is broken

d. the file structure of the 2 hard drives are not compatible

Answers

Your answer is D.

Hope this helps and if you could answer the question I just uploaded titled giving brainliest that would be great. Basically, what you have to do is research why the book titled the list of things that will not change and explain why it’s your favorite book based on the message it tells you! Go to my profile and go to questions.

The answer is D, What is the likely cause of this issue is that the file structure of the two hard drives are not compatible.

The file structure or file system, of a hard drive, tells the disk how to read, write and store information on the drive. Some file systems do not allow the disk to store any files and often do not display error messages. If we try to drag a file onto a hard drive with this kind of file structure, the action would simply not be performed. This can be fixed by formatting the disk partition into a new file system.

Option B states that the issue may be that the photos were taken in a different country. This is not the cause of the problem because regardless of where the pictures are taken, they are all stored in common formats such as:

JPEGPNGJFIF

Any external hard drive capable of storing images will have the ability to receive files in these formats as well as many other image formats. For this reason, option B is False.

The question states that you were able to connect the external Hard drive and drag files onto it, though unsuccessfully. This tells us that the USB port is working as intended, if it were not working, it would not display the Hard drive onto the computer and we would not be able to drag files to it. Therefore, option C is false

Insufficient Hard drive storage space is a common issue in not being able to transfer files between hard drives. However, if this were the case, the user would be shown a message displaying the error. The message may look like:

"Insufficient space on the disk.""The Disk is full.""Not enough memory to complete this action"

The exact wording may vary depending on the operating system in use. Since the question states that the files simply "bounces back" without an error message displaying, we can infer that option A is false.

For more help with Hard drive issues see: https://brainly.com/question/14254444?referrer=searchResults

Type the correct answer in the box. Spell all words correctly.
Which testing requires coding the test cases into a scripting language?
testing requires coding the test cases into a scripting language.

Answers

Answer:

sorry I forgot it

Explanation:

because I am now in a last position

Select the correct statement(s) regarding IP addressing.
a. IPv4 and IPv6 addressing is fully compatible with one another.
b. CIDR address format represents a Class C network only used within an intranet.
c. Subnet masks are used with both class and classless IP addresses.
d. all statements are correct.

Answers

Yeah the answer is b

Subnet masks are used with both class and classless IP addresses is the correct statement. Therefore, the correct option is C.

What is an IP address?

A device on the internet or a local network may be identified by its IP address, which is a special address. The rules defining the format of data delivered over the internet or a local network are known as “Internet Protocol,” or IP.

Only C is correct, rest other statements are incorrect because:

a. IPv4 and IPv6 addressing is fully compatible with one another is incorrect. While IPv4 and IPv6 can coexist on the same network, they are not fully compatible with one another.

b. CIDR address format represents a Class C network only used within an intranet is incorrect. Classless Inter-Domain Routing (CIDR) is a technique used to allocate IP addresses more efficiently.

Therefore, subnet masks are used with both class and classless IP addresses is the correct statement. Therefore, the correct option is C.

Learn more about,  here

https://brainly.com/question/3805118

#SPJ6

If you are to enhance the ICT used by your teachers, how will ypu do it? Will you use the same ICT or will you modify how it was integrated?​

Answers

To enhance the ICT (Information Communication Technology) used by teachers, I will modify how the ICT was integrated.

The modification of how ICT is integrated will change the culture that places teaching over technology.  Then, teachers will be taught how to use ICT to:

improve learning so that teachers become learning facilitatorsmotivate learners by fostering learning autonomy, making students less dependent on the teacherengage the learners by creating collaborative learningdiminish content learning so that students learn to think, create, and communicate effectivelymake learning a lifetime culture enhance the learning environment so that teachers become collaborators and co-learners with students.

Thus, I will enhance the ICT used by teachers by modifying its integration to achieve better results for both teachers and learners.

Learn more about the importance of ICT here: https://brainly.com/question/13724249

The program is the set of instructions a computer obeys

Answers

Answer:

True

Explanation:

a program is basicly just a list of commands you can run over and over again.

What Causes #### error?​

Answers

Answer:

The answer is below

Explanation:

Causes of ####error in Microsoft Excel can be traced to multiple sources. The major causes of #### error in Microsoft Excel, however, are the following:

1. When the column is not wide enough to show all values or figures of the cell contents.

2. When there are too many decimal places of the figure in a cell

3. When the date value in the cell is negative

4. When the time value in the cell is negative.

Fit a boosting model to the training set with Purchase as the response and the other variables as predictors. Use 1,000 trees, and a shrinkage value of 0.01. Which predictors appear to be the most important

Answers

Answer and Explanation:

For the training set consist of 1000 observations, let's have a set consist of the observations such as sets.seed train boost.caravan gbm(Purchase., data = Caravan.train , distribution = "gaussian" , n trees = 1000 summary(boost.caravan) The tree classification such as tree(formula = Purchase data - train where variable are used in tree construction and number of terminal nodes 0 and deviance is 0.7 and error is 0.165

How to prepare and draw a corresponding flowchart to compute the sum and product of all prime numbers between 1 and 50

Answers

Answer:

Create boxes with the following content

Initialize sum to 0, product to 1 and number to 1Check if number is a prime. If yes, update sum += number and product *= numberIncrease number by 1If number is <= 50, go back to "check" block.

The check block has a diamond shape.

At the "yes" branch of the check block, you can create separate blocks for updating the sum and the product.

Connect the blocks using arrows.

Indicate the start and the end of the flow using the appropriate symbols.

The block to check if a number is a prime you could further decompose into the steps needed to do such a check.

hi, please help me.solution.​

Answers

Answer:

aahdbdnsjajaissjdjdhskakwjdhbebs

Code Example 9-1 struct Product { string name; double price; int quantity; }; (Refer to Code Example 9-1.) Given a Product object named product, which of the following statements would you use to display the value of the name data member on the console? a. cout << product::name; b. cout << product.name; c. cout << product("name"); d. cout << product[0];

Answers

Answer:

a. cout << Product ::name;

Explanation:

Computer software use different languages which helps user to initiate command. When a user initiates command the results are displayed according to input command. If product name is required as output then insert command should be product::name; this will display names of different products present in the system.

An error due to wrong input by the user

Answers

Answer:

when did it take place..

Other Questions
Which of the given assertion methods will return true for the code given below? Student student1 = new Student(); Student student2 = new Student(); Student student3 = student1; The Student class is as follows. public class Student{ private String name; }a. assertEquals(student1, student2); b. assertEquals(student1, student3); c. assertSame(student 1, student3); d. assertSame(student1, student2); If h(x) = x2-5x + 7 find: h(-8) Q- Wheel of a running vehicle has which energy?(a) Vibrational Kinetic energy(b) Translational Kinetic energy(c) Rotational Kinetic energy(d) All of the above What does the statement that follows do? double gallons[6] = { 12.75, 14.87 }; a. It assigns the two values in the initialization list to the first two elements but leaves the other elements with the values currently in memory. b. It assigns the two values in the initialization list to the first and second elements, third and fourth elements, and fifth and sixth elements. c. This statement is invalid. d. It assigns the two values in the initialization list to the first two elements and default values to the other elements. Each piece of DNA called acarriesthe code forhuman characteristic. The whole human codecontains aboutsections or PLEASE HELP PLEASE!!!! AB||CD . Find the measure of BFG. Find the equation of the line that is parallel to f(x) and goes through point (-1,7). 1. A set is said to be a singleton set,iga) n (A)=1 b) n (A)=0 El estado de California usa un sistema de trnsito.para rehabilitar a los infractores crnicos de leyes Beck Inc. and Bryant Inc. have the following operating data: Beck Inc. Bryant Inc. Sales $336,700 $1,092,000 Variable costs 135,100 655,200 Contribution margin $201,600 $436,800 Fixed costs 138,600 268,800 Income from operations $63,000 $168,000 a. Compute the operating leverage for Beck Inc. and Bryant Inc. If required, round to one decimal place. Choose the correct statements about the ROC curve.A. By plotting the true-positive rate against the false-positive rate for different threshold values, the ROC curve can be used to select the optimal model.B. ROC stands for Receiver Operating Characteristic curve, which was originally developed to detect enemy aircrafts on radar.C. The ROC curve is a useful diagnostic tool for determining the optimal classification model.D. The ROC curve was originally developed to optimize healthcare and detect congestive heart failure readmission rate. How can a simulation study be used to learn about a planet we have never visited?In a simulation study you imitate some conditions and characteristics of the real planet. The simulation can be used as a substitute for real data collected on the planet.Simulation studies can be used for planets we have already visited.In a simulation study you imitate as many conditions and characteristics as possible of the real thing, in this case the planet you have not visited. By simulating as many conditions as possible you can visualize what the planet might be like and learn things about it without actually visiting it.Simulation studies cannot be used to learn about a planet we have never visited because we do not know anything about the planet. Please help me from 1 to 20 please Look at the graph shown.Which equation best represents the line? (4 points)y = 1 over 3.x 1y = 3x 1y = x + 1 over 3.y = 3x + 1 Find the product: 12 x 3/5 = Please help me I need this so I can get off my computer it's so late rn convert 8 1/10 into an improper fraction El 5 de diciembre se solicit un prstamo por USD.275,000, negociado al 6.5%de inters anual a un plazo de 5 aos. Los pagos de capital e intereses se harnmensualmente. a. What is energy? Write its unit. subject science Name at least two extinct species that share a close evolutionary relationship with humpback whales.