Write a program that accepts the lengths of three sides of a triangle as an input from the user: A, B, C

Validate the user input so that the user can only enter positive values for sides A, B, C. All three must be true:

A > 0
B > 0
C > 0

Answers

Answer 1

Answer:

The program in Python is as follows:

A = int(input("A: "))

B = int(input("B: "))

C = int(input("C: "))

while A<=0 or B <= 0 or C <= 0:

   A = int(input("A: "))

   B = int(input("B: "))

   C = int(input("C: "))

print("Valid inputs")

Explanation:

Get input for A, B and C

A = int(input("A: "))

B = int(input("B: "))

C = int(input("C: "))

The loop is repeated until inputs for A, B and C are above 0

while A<=0 or B <= 0 or C <= 0:

Get input for A, B and C

   A = int(input("A: "))

   B = int(input("B: "))

   C = int(input("C: "))

Print valid inputs when user inputs are correct

print("Valid inputs")


Related Questions

The menu bar display information about your connection process, notifies you when you connect to another website, and identifies the percentage information transferred from the Website server to your browser true or false

Answers

Answer:

false

Explanation:

My teacher quized me on this

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.

Answers

Answer:

It assigns the two values in the initialization list to the first two elements and default values to the other elements.

Explanation:

Given

The array initialization

Required

Interpret the statement

double gallons[6] implies that the length/size of the array gallons is 6.

In other words, the array will hold 6 elements

{12.75, 14.87} implies that only the first two elements of the array are initialized ; the remain 4 elements will be set to default 0.

you are the network administrator for a college. wireless access is widely used at the college. you want the most secure wireless connections you can have. which of the following would you use?
A WPA
B WEP2
CWEP
D WPA2

Answers

Answer:

D. WPA2

Explanation:

Required

Of the 4 options, which is the most secured?

WPA was created as a solution to the vulnerabilities in WEP/WEP2. Then, WPA was upgraded to WPA2.

WPA2 is the least vulnerable to hacks because for every user that is connected to the network through WPA2, a unique encryption is made available for such connection.

Hence, the most secure connection, of the 4 is WPA2.

Consider the following JavaScript code fragment:var greeting = function ( name ) {console.log ( name )}The best answer for what is wrong with this code is:Group of answer choices

Answers

Answer:

name is a reserved word in JS and cannot be used as an identifier

Explanation:

From the group of answer choices provided the only one that may be a problem would be using the word name as a parameter. Although name is not a reserved word per say in JS it is in HTML, and since JS targets HTML it could cause some errors. This however does not prevent this code from running correctly. JS does not require semicolons anymore, and the opening and closing braces for a body of code does not need to be on their own lines. Also, variable names are not Strings and do not need to be inside quotes, even for console.log()

An organization needs to integrate with a third-party cloud application. The organization has 15000 users and does not want to allow the cloud provider to query its LDAP authentication server directly. Which of the following is the BEST way for the organization to integrate with the cloud application?

a. Upload a separate list of users and passwords with a batch import.
b. Distribute hardware tokens to the users for authentication to the cloud
c. Implement SAML with the organization's server acting as the identity provider.
d. Configure a RADIUS federation between the organization and the cloud provider

Answers

Answer:

The BEST way for the organization to integrate with the cloud application is:

c. Implement SAML with the organization's server acting as the identity provider.

Explanation:

Implementing SAML (Security Assertion Markup Language) integrations will provide more security to the organization (identity provider) as users' credentials are exposed to fewer parties.  SAML authenticates the users to the cloud application provider.  SAML enables the organization to pass authorization credentials to the service provider by transferring the users' identities to the service provider.

A red team initiated a DoS attack on the management interface of a switch using a known vulnerability. The monitoring solution then raised an alert, prompting a network engineer to log in to the switch to diagnose the issue. When the engineer logged in, the red team was able to capture the credentials and subsequently log in to the switch. Which of the following actions should the network team take to prevent this type of breach from reoccurring?
A. Encrypt all communications with TLS 13
B. Transition from SNMPv2c to SNMPv3 with AFS-256
C. Enable Secure Shell and disable Telnet
D. Use a password manager with complex passwords

Answers

Answer:

Hence the answer is Option A Encrypt all communication with TLS 1 3.

Explanation:    

Transportation Layer Security (TLS 1 3)---->TLS stands for Transport Layer Security and is the successor to SSL (Secure Sockets Layer). TLS provides secure communication between web browsers and servers. The connection itself is secure because symmetric cryptography is used to encrypt the transmitted data.  

SNMPv3 Security with 256 bit AES encryption is not available for all devices. The net-snmp agent does not support AES256 with SNMPv3.so it is not the correct option.  

The best choice is an option a because TLS 1 3 because,  

TLS version 1 3 helped in removing all the insecure features such as:  

SHA-1

RC4

DES

3DES

AES-CBC

A desktop computer is a type of mobile device.

a. true
b. false

Answers

Answer:B.false
Answer B

A desktop computer is a type of mobile device: B. False.

What is a desktop computer?

A desktop computer simply refers to an electronic device that is designed and developed to receive data in its raw form as an input and processes these data into an output that's usable by an end user.

Generally, desktop computers are fitted with a power supply unit (PSU) and designed to be used with an external display screen (monitor) unlike mobile device.

In conclusion, a desktop computer is not a type of mobile device.

Learn more about desktop computer here: brainly.com/question/959479

#SPJ9

Queues can be represented using linear arrays and have the variable REAR that point to the position from where insertions can be done. Suppose the size of the array is 20, REAR=5. What is the value of the REAR after adding three elements to the queue?

Answers

Answer:

8

Explanation:

Queues can be implemented using linear arrays; such that when items are added or removed from the queue, the queue repositions its front and rear elements.

The value of the REAR after adding 3 elements is 5

Given that:

[tex]REAR = 5[/tex] --- the rear value

[tex]n = 20[/tex] --- size of array

[tex]Elements = 3[/tex] --- number of elements to be added

When 3 elements are added, the position of the REAR element will move 3 elements backward.

However, the value of the REAR element will remain unchanged because the new elements that are added will only change the positioning of the REAR element and not the value of the REAR element.

Read more about queues at:

https://brainly.com/question/13150995

After reading the background, please work on the following problem: a. The source process reads information from a file (Therefore, you need to prepare a small text file for testing purpose). b. The source process calls fork() to create the filter process. c. The filter process reads information from the source process (passed via an anonymous pipe), converts the uppercase characters to lowercase ones and vice versa, and then prints out the converted characters to the screen.

Answers

Answer:

Explanation:

The following code is written in Java. It has the main method (source process) and a function called fork() which contains the filter process as described in the question. fork() takes in the file information as a parameter and prints out the information to the screen. The test can be seen with the output in the attached image below.

import java.io.File;

import java.io.FileNotFoundException;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       String data = "";

       try {

           File myObj = new File("C:\\Users\\Gabriel2\\AppData\\Roaming\\JetBrains\\IdeaIC2020.2\\scratches\\input.txt"); //USE YOUR FILE LOCATION

           Scanner myReader = new Scanner(myObj);

           while (myReader.hasNextLine()) {

               data += myReader.nextLine();

               data += "\n";

           }

           myReader.close();

       } catch (FileNotFoundException e) {

           System.out.println("An error occurred.");

           e.printStackTrace();

       }

       System.out.println("Original: \n" + data);

       fork(data);

   }

   public static void fork(String data) {

       String output = "";

       for (int i = 0; i < data.length(); i++) {

           if (Character.isUpperCase(data.charAt(i)) == true) {

               output += Character.toLowerCase(data.charAt(i));

           } else if (Character.isLowerCase(data.charAt(i)) == true) {

               output += Character.toUpperCase(data.charAt(i));

           } else {

               output += data.charAt(i);

           }

       }

       System.out.println("Modified: \n" + output );

   }

}

Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string. The output should include the input character and use the plural form, n's, if the number of times the characters appears is not exactly 1. Ex: If the input is: n Monday the output is: 1 n Ex: If the input is: z Today is Monday the output is: 0 z's Ex: If the input is: n It's a sunny day the output is: 2 n's Case matters. Ex: If the input is: n Nobody the output is: 0 n's n is different than N.

Answers

Answer:

The program in Python is as follows:

char = input("Character: ")[0]

string = input("String: ")

kount = string.count(char)

print(kount,char,end="")

if kount!=1:

   print("'s")

Explanation:

This gets character input

char = input("Character: ")[0]

This gets string input

string = input("String: ")

This counts the occurrence of char in string

kount = string.count(char)

This prints the number of occurrence and the character

print(kount,char,end="")

This prints 's, if kount is other than 1

if kount!=1:

   print("'s")

kỹ năng học tập ở bậc đại học là gì

Answers

Answer:

please translate

Thank you ✌️

All of the following are true of using the database approach to managing data except Group of answer choices Decentralized management of data Minimal data redundancy Data integration and sharing

Answers

Answer:

Decentralized management of data

Explanation:

The database management approach is one approach based on the improved standard file solution with the use of DBMS and allows for the stimulus access of data with a large number of users.

Phân tích vai trò của các yếu tố trong biên tập Audio và Video

Answers

Answer:

Answer to the following question is as follows;

Explanation:

A visual language may go a long way without even text or narrative. Introductory angles, action shots, and tracker shots may all be utilised to build a narrative, but you must be mindful of the storey being conveyed at all times. When it comes to video editing, it's often best to be as cautious as possible.

The tax calculator program of the case study outputs a floating-point number that might show more than two digits of precision. Use the round function to modify the program to display at most two digits of precision in the output number.

Answers

Answer:

Explanation:

The following code is written in Python. The tax calculator program was not provided, therefore I created a tax calculator that takes in the total price as an input and adds a 7% tax to it. Then it uses the round() function to make sure that the total is outputted as a decimal with two decimal digits at most.

def taxCalculator(price):

   total = price * 1.07

   formattedTotal = round(total, 2)

   return formattedTotal

Company A has a project plan for a new product under development. The product will be one of many released in the coming year. The plan, if disclosed, might give Company A's competition a market advantage. Which ISO 27002 classification level is most likely assigned to this document?
a) Public Documents
b) Proprietary
c) Highly Confidential
d) Top Secret

Answers

Answer:

Company A

The ISO 27002 classification level that is most likely assigned to this document is:

b) Proprietary

Explanation:

The ISO 27002 classification levels adopted by commercial organizations are Restricted (top secret is preferred in government circles), Confidential, Internal (or proprietary), and Public. Since the new product is under development, one of many, and most likely known to the project team, the project plan will be classified as Proprietary.  Company A designates this document as Proprietary or Internal to show that disclosure of the information to its competitors is not allowed.  This level of classification shows that Company A can establish intellectual property rights over the document.

which technique is the best to help you manage time better ​

Answers

Answer:

Make a schedule and select certain times to do certain things so that you could have time for more things.

Explanation:

I did the same thing now I can make time for myself.

The Lisp function LENGTH counts the number of elements in the top level of a list. Write a function ALL-LENGTH of one argument that counts the number of atoms that occur in a list at all levels. Thus, the following lists will have the following ALL-LENGTHs.
(A B C) => 3
((A (B C) D (E F)) => 6
(NIL NIL (NIL NIL) NIL ) => 5

Answers

Answer:

bc

Explanation:

why SSTF disk scheduling is not practically feasible?​

Answers

Answer:

There is a lack of predictability because of the high variance of response time. Additionally, SSTF may cause starvation of some requests. Starvation is possible for some requests as it favors easy to reach requests and ignores the far-away processes.

SSTF disk scheduling is not practically feasible because it makes an external call and is forced to wait for I/O to complete, thereby giving up its first-place position.

What is SSTF disk scheduling?

Shortest Seek Time First (SSTF) is a disc scheduling algorithm that is abbreviated as SSTF. Before moving the head away to service other requests, it selects the request that is closest to the current head location.

Because of the high variance in response time, there is a lack of predictability. Furthermore, SSTF may cause some requests to be denied. Some requests may experience starvation because the system prioritizes nearby requests and overlooks distant operations.

Therefore, because it makes an external call and is obliged to wait for I/O to complete, SSTF disc scheduling is not viable because it loses its first-place status.

To learn more about SSTF disk scheduling, refer to the link:

https://brainly.com/question/23552555

#SPJ2

There must be security policies in place to set core standards and requirements when it comes to encrypted data.

a. True
b. False

Answers

You’re best answer has to be A

Brooke is trying to save enough money in the next year to purchase a plane ticket to Australia. Every month Brooke saves $200. Write a for loop that displays how much money Brooke will save at the end of each month for the next 12 months.

Answers

Answer:

var monthlyDeposit = 200;

var accountBalance = 0;

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

   accountBalance += monthlyDeposit;

   console.log(accountBalance);

}

Which of the following are advantages of a local area network, as opposed to a wide area network? Select 3 options.

provides access to more networks

higher speeds

more secure

lower cost

greater geographic reach

Answers

higher speeds lower cost more secure

Answer:

✅ more secure

✅ lower cost

✅ higher speeds

Explanation:

Edge 2022

Book information (overriding member functions) Given main() and a base Book class, define a derived class called Encyclopedia. Within the derived Encyclopedia class, define a PrintInfo() function that overrides the Book class' PrintInfo() function by printing not only the title, author, publisher, and publication date, but also the edition and number of volumes. Ex. If the input is: The Hobbit J. R. R. Tolkien George Allen & Unwin 21 September 1937 The Illustrated Encyclopedia of the Universe James W. Guthrie Watson-Guptill 2001 2nd 1 the output is: Book Information: Book Title: The Hobbit Author: J. R. R. Tolkien Publisher: George Allen & Unwin Publication Date: 21 September 1937 Book Information: Book Title: The Illustrated Encyclopedia of the Universe the output is: Book Information: Book Title: The Hobbit Author: J. R. R. Tolkien Publisher: George Allen & Unwin Publication Date: 21 September 1937 Book Information: Book Title: The Illustrated Encyclopedia of the Universe Author: James W. Guthrie Publisher: Watson-Guptill Publication Date: 2001 Edition: 2nd Number of Volumes: 1 Note: Indentations use 3 spaces. LAB ACTIVITY 11.14.1: LAB: Book information (overriding member functions) File is marked as read only Current file: main.cpp cin >> numVolumes; main.cpp Book.h 25 26 27 28 29 30 31 32 33 34 35 36 myBook. SetTitle(title); myBook. SetAuthor(author); myBook. SetPublisher(publisher); myBook.SetPublicationDate(publicationDate); myBook.PrintInfo(); Book.cpp Encyclopedia.h myEncyclopedia. SetTitle(eTitle); myEncyclopedia. SetAuthor(eAuthor); myEncyclopedia. SetPublisher(ePublisher); myEncyclopedia. SetPublicationDate(ePublicationDate); Encyclopedia.cpp

Answers

Answer:

hansnmakqkai8aiaiakqklqlqlqlqlqqqw

Ann, a customer, purchased a pedometer and created an account or the manufacturer's website to keep track of her progress. Which of the following technologies will Ann MOST likely use to connect the pedometer to her desktop to transfer her information to the website?

a. Bluetooth
b. Infared
c. NFC
d. Tethering

Answers

Answer:

The technologies that Ann will MOST likely use to connect the pedometer to her desktop to transfer her information to the website are:

a. Bluetooth

and

c. NFC

Explanation:

Bluetooth and NFC (Near Field Communication) are wireless technologies that enable the exchange of data between different devices.  Bluetooth operates on wavelength.  NFC operates on high frequency.  The security of NFC over Bluetooth makes it a better tool of choice.  NFC also operates on a shorter range than Bluetooth, enabling a more stable connection. NFC also enjoys a shorter set-up time than Bluetooth.  It also functions better than Bluetooth in crowded areas.  Tethering requires the use of physical connectors.  Infrared is not a connecting technology but wave radiation.

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

While troubleshooting an Internet connection problem for your network, you restarted the modem and then the router. The router is now communicating with the Internet, which you can confirm by observing the blinking light on the router's WAN indicator. However, now your laptop is not communicating with the router. Order the commands below to fix the problem and confirm connectivity.
a. ping
b. ipconfig /renew
c. nslookup microsoft.com
d. ipconfig /release

Answers

Answer:

d. ipconfig /release

b. ipconfig /renew

a. ping

c. nslookup microsoft.com

Explanation:

A router can be defined as a network device that is designed typically for forwarding data packets between two or more networks based on a well-defined routing protocol.

Basically, it is an electrical device or node that is designed to connect two (2) different networks (in different locations) together and allows them to communicate.

Generally, routers are configured using a standard routing protocol with an IP address as the default gateway.

Dynamic Host Configuration Protocol (DHCP) is a standard protocol that assigns IP address to users automatically from the DHCP server.

Basically, a DHCP server is designed to automatically assign internet protocol (IP) address to network devices connected to its network using a preconfigured DHCP pool and port number 67.

On a related note, when a computer that is configured with DHCP cannot communicate or obtain an IP address from the DHCP server, the Windows operating system (OS) of the computer automatically assigns an IP address of 169.254.33.16, which typically limits the computer to only communicate within its network.

I. ipconfig /release

II.. ipconfig /renew

III. ping

IV. nslookup microsoft.com

Which factors are involved in search engine optimization​

Answers

Answer:

A Secure and Accessible Website.

Page Speed (Including Mobile Page Speed)

Explanation:

Argue whether we can infer anything about a candidate’s ability to work in a professional environment based on his or her resume’s formatting.
Compare how you would address a resume with wacky fonts to how you would respond to grammatical errors in a resume.

Answers

Answer:

when dressing feaded back is postive and then list areas of inprovmenr to met the job requirements

Explanation:

A hierarchy chart can be helpful for a. planning the functions of a program b. naming the functions of a program c. showing how the functions of a program relate to each other d. all of the above e. a and c only

Answers

Answer:

Hence the correct options are option B and option C.

Explanation:  

Hierarchy Chart means top to bottom structure 0f a function or a program or an organization.  

Planning the functions of a program means deciding beforehand that what are the functions of a program and what to try to do and when to try to, hierarchy Charts are often helpful In doing/knowing this all.

   Showing how the functions of a program relate to every other means what's the connection between two functions for instance if we have a hierarchical chart of a corporation member then we'll have the connection among the members of the team i.e., first, we'll have CEO, then Manager then team/ project lead then team members and by using hierarchical chart ready to " we will be able to identify the connection among them. during a similar way, we will have a relationship among the functions of a program using the hierarchical chart.

Which of the following views is the best view to use when setting transition effects for all slides in a presentation?

Answers

Answer:

Slide sorter view

Answer:

Slide sorter view !!!!!

Write a program that prompts the user to enter a positive integer and displays all its smallest factors in decreasing order.

Answers

Answer:

<fact>[ZRjKt9sw6V(gh6E)ehNM3]<zip>

Explanation:

Other Questions
What are the examples of pulley? Plz tell the answer as fast as possible plz. Franklin used the polynomial expression x(x3)(x+4) to model the volume of a rectangular prism. What is the length of the shortest side of this prism? A x B x3 C x23x D x3+x212x Emma went out shopping with her father and bought a dress that cost $40.00. In class, shelearned to find the sales tax by multiplying by .08 (the sales tax in her state is 8%). Emmafound the tax, and then added the tax to the original amount. Emma's mother suggested thatshe should just multiply the cost of the dress by 1.08 and that this method would give her thefinal answer with the tax included. Emma was confused. Who is right? Work it out both waysand explain your thinking. Find the missing side of the right triangle. The following reaction is not an oxidation-reduction reaction: Fe(s) + 2Hl(aq) --- Fel (aq) + H_(8) Select one: O True O False A s A p P p pP p p p p P P PP PpPppPP P P P PPPPPPPppppppppPPPpP A study was done to determine the proportion of voters that feel that their local government is doing an adequate job. Of the 220 voters surveyed, 175 feel that their local government is doing an adequate job. Calculate the 95% confidence interval for the true proportion of voters that feel that their government is doing an adequate job. If any parts manufactured by Brown Machine Inc. should prove defective within one year from the date it is delivered new to the purchaser, the product will be ____________ immediately.Select one:A. revisedB. replaced CorrectC. preparedD. consumed From the list below, select the items that are classified as a materials activity. (You may select more than one answer. Single click the box with the question mark to produce a check mark for a correct answer and double click the box with the question mark to empty the box for a wrong answer. Any boxes left with a question mark will be automatically graded as incorrect.) Raw materials used Raw materials beginning inventory Raw materials purchases Work in process beginning inventory Goods manufactured Direct labor used Factor overhead used Explain the analysis of the poem Repair by Finuala Dowling hii pls help me to balance the equation and state the symbols thanksss easy algebra question below first correct answer gets brainliest Enlight the contribution of science and technology for current pandemic of Corona virus?? Journalize the entries for the following transactions: Mar. 1 Established a petty cash fund of $771. 31 The amount of cash in the petty cash fund is now $632. The fund is replenished based on the following receipts: office supplies, $33 selling expenses, $113. Record any discrepancy in the cash short and over account. If an amount box does not require an entry, leave it blank. How the amount of acid rain caused by the burning of fossil fuels can be reduced ? A firework is launched into the air from ground level with an initial velocity of 128 ft/s. If acceleration due to gravity is 16 ft/s2, what is the maximum height reached by the firework? Identify the mood of the verb used in this sentence.Pick up those confidential files on the table please.o indicativeo imperativeo subjunctiveo inspection If give 7 billions for 7 millions people. What is total? Match each land resource to its use. clay - used to make steel iron ore - used to make batteriessalt - used to make pottery and tilesaggregate - used in constructiongraphite - used as a flavoring in foodi will give 10 points and brainliest!!! how has technology changed farming a- there are fewer farms than there used to be b- farmers use mechanical devices to do my tasks.c-farmers produce less food than they used to.d- pesticides are no longer used on most farms