Write a program that checks whether the number is positive or negative. If the number is positive, then it should calculate its factorial otherwise the program should print the message that the factorial of the negative number is not possible. For this program you are required to use the while loop.
Q: Find the complexity of the following blocks of code or algorithm's description. [Note: your answer…
A: The correct answer for the above mentioned question is given in the following steps for your…
Q: Complete the TODO function by converting the TPR equation into code so that we can compute the TPR…
A: Complete the TODO function by converting the TPR equation into code so that we can compute the TPR…
Q: Give an example of a time when you had trouble getting your message across while taking part in an…
A: COMMUNICATION BARRIERS: The following list of communication problems that might occur during online…
Q: don't want copy paste answer please Here is a schedule with one action missing: R1(C); W2(D);…
A: In this question, a timetable is provided. R1(C); W2(D); R2(B); ???; W1(A); R3(D); W2(C); W3(B)…
Q: Why did Cisco Systems decide to switch from a traditional access control system to one that ran over…
A: Individual control systems: systems for simple access control. used just in one place. not connected…
Q: What is the relevance of communication protocols, and which protocol(s) did your department select?
A: The answer to the question is given below:
Q: What is a benefit of using an HTML text editor?
A: The answer to the following question:-
Q: A computer virus is a malicious programme that replicates itself rapidly across computers,…
A: A computer virus is a harmful software code that spreads via networks, the internet, and removable…
Q: (python) calculating time in Bubble Sort the funtion will only run for 40 seconds create a list…
A: create a list that stats with 5 and will be adding 5 each time, 5+5+5+5+...... until the program…
Q: A gym assigns all patrons a membership ID number that consists of eight alphanumeric characters. The…
A: A gym assigns all patrons a membership ID number that consists of eight alphanumeric characters. The…
Q: CLO-4] What is the output of the following code public class X{ public X(int i){…
A: We have given a java program. In the question, we have to find the output of the program. We will…
Q: How relevant are rules about who can and cannot enter a certain area, anyway, in the modern world?…
A: Introduction: Access control is a security method that limits who or what may access resources. in…
Q: Identify one predicate device that is currently approved, and that device may not necessarily be…
A: Introduction Predicate device: A predicate device (PD) is a medical device that is currently…
Q: Having this error message when I try to open one of the files in my project on Eclipse: Could not…
A: The following solution is
Q: Why not use a symbolic constant in place of a formal argument when passing information into a…
A: The following explanation of the provided question is based on the C++ programming language. Formal…
Q: 2. Write a program that asks the user to input a number (n) and display the sum of first n integers…
A: Dear Student, The source code, implementation and expected output is given below -
Q: What does it mean for a central processing unit to have several cores? How does it improve upon the…
A: Introduction: A processor that is composed of more than one core logic is referred to as a…
Q: There is a standard architecture upon which all software is constructed. Tell me about the various…
A: All software has a certain architecture. Discuss architectural styles. Architectural style, or…
Q: A new family is moving into a new house. They hope to use it for both academic and recreational…
A: Home network: A Local Area Network (LAN) is a collection of computers and peripheral devices…
Q: ctors, also being able to cho
A: How can I make a pentagon in java using constructors, also being able to choose its area and…
Q: On this assignment, efficiency concerns are more important than on previous assignments. For this…
A: ALGORITHM : 1. Start2. Initialize ans as Max value.3. Iterate through array and compare each element…
Q: To what end does memory serve? "Random Access Memory" is abbreviated to "RAM." In the realm of…
A: What is the purpose of memory? RAM, ROM, and secondary memory are the types of memory that are used…
Q: Comparatively to the previous generation, the fourth generation of networks (4G) supports both voice…
A: Comparatively to the previous generation, the fourth generation of networks (4G) supports both voice…
Q: Complete the TODO function by converting the PPV equation into code so that we can compute the PPV…
A: Compute and return the PPV score using the above PPV equation. Recall, tp stands for true positive…
Q: Write a Java program that displays the contents of the following 3 arrays: // Create arrays of…
A: The source code of the program public class Main { // generic method "printArray" public static…
Q: How does a server realise that a remote item he has been providing to clients is no longer needed…
A: With or without protocol support, we can assign the task of cleaning up objects to the client or the…
Q: Define information security governance and list five overarching principles that must be met for it…
A: Five computer forensics steps: Computer forensics inquiry is growing as law enforcement and prisons…
Q: in c++ Write a function named “getLowest” that accepts a vector of pointers to Student objects. It…
A: Here is the program with getLowest function:
Q: How do normally unknown networks relate to and interact with trusted networks protected by a…
A: The unknown networks refers to the internet.
Q: Yahtzee! Yahtzee is a dice game that uses five die. There are multiple scoring abilities with the…
A: Steps : 1. import random module 2. function to check if all 5 numbers are same in list 3. function…
Q: Can you explain the distinction between testing and debugging in the context of computer programs?
A: Testing: Examine the procedure for confirming and assuring that the programme or application is…
Q: Although you are not required to abide by this request, you are free to do so if you are capable of…
A: It is necessary to go into these topics in astonishing depth. As a project at AT&T Bell…
Q: 6. When RS=0, then the cost of computing R. Join S is a. the same as R S b. greater than R-S c. less…
A: 6. find out cost computing of R join S which option is correct 7. if entity belong to only one lower…
Q: There are several considerations that must be made for a compiler to generate good and efficient…
A: A compiler is a special program that translates a programming language's source code into machine…
Q: Explain why deep access is preferable than shallow access from the standpoint of a developer, rather…
A: Introduction: Deep access is the method of accessing non-local variables, and it is used to keep a…
Q: If the CFO signs documentation that indicates you should be given permission to delete sensitive…
A: If the CFO signs documentation that indicates you should be given permission to delete sensitive…
Q: For what reasons is it critical that web designers create legally and morally compliant accessible…
A: Reasons to make accessible websites: Website accessibility boosts readership and generates a…
Q: From the perspective of a service, what are the key differences between symmetric-key and public-key…
A: A KEY DIFFERENCE BETWEEN PUBLIC KEY AND SYMMETRIC KEY SYSTEMS- The primary distinction between a…
Q: Java - Encapsulation A rectangle can be formed given two points, the top left point and the bottom…
A: The correct answer for the above mentioned question is given in the following steps for your…
Q: should be taken? If data integrity and user authentication are both broken, which security method…
A: To what extent do you think these precautions should be taken? If data integrity and user…
Q: Which image support's image layers? A. JPG B.GIF C. BMP D.PNG
A: GIF layer support the image layer not the other one.
Q: Develop an inter-realm version of the Kerberos
A: Dear Student, The answer to your question is given below -
Q: signals the processor for I/O. It is more efficient than polling, but still impacts the processor.…
A: Let's see the answer:
Q: Given main.py, complete the Stack class in Stack.py by writing the push() and pop() methods. The…
A: class Stack: def __init__(self, allocation_size): self.array = [None] * allocation_size…
Q: Identify the most common uses of stacks in code and defend their relevance.
A: A Stack is a popular linear data structure in modern computers that allows for element insertions…
Q: A document is represented as a collection paragraphs, a paragraph is represented as a collection of…
A: The correct answer for the above mentioned question is given in the following steps for your…
Q: When it comes to people's safety and personal information, how does data mining play a role?
A: Introduction: Data mining is looking for patterns in large amounts of data. Furthermore, analyzing…
Q: Can software be purchased? If that's the case, what are some of the most common ways to get your…
A: Can software be purchased? If that's the case, what are the numerous software acquisition channels?…
Q: Write a java application which initializes an array with ten random integers between 1 and 6. Write…
A: The following are steps that need to be taken for the given program: Using Math.random() function,…
Q: Examine the parallels and distinctions between Governance and Management as they pertain to the…
A: Introduction: In the context of information system auditing, contrast governance and management.…
Write a code using c
Step by step
Solved in 3 steps with 1 images
- please solve it ( c languge) Write a program that checks whether the number is positive or negative. If the number ispositive, then it should calculate its factorial otherwise the program should print the messagethat the factorial of the negative number is not possible. For this program you are requiredto use the while loop.In python, A customer in a store is purchasing items. Write a program, using a while loop, that asks for the price of each item, then displays the subtotal of the sale, the amount of sales tax, and the total when the customer is done entering all the items. Assume the sales tax is 7 percent. The customer should be allowed to enter as many items as they wish. The while loop should terminate when the user hit the key (Return) on the keyboard. (Hint: Use a null or empty string). Optionally, if you would like to round the dollar amount to two decimal places, you can use output formatting construct in your print statement. For example: print("Sales tax: ", format(sales_tax, '.2f')) will round to two decimal places. Expected Output: Enter the item price or <ENTER> to end: 22.50Enter the item price or <ENTER> to end: 1.99Enter the item price or <ENTER> to end: 45.30Enter the item price or <ENTER> to end: 70Enter the item price or <ENTER> to end: 5Enter the item…2. Write a program that uses a while loop to play a number guessing game. The computer should pick a number using random number generation and then continue asking the user to guess the number until they get it right. For each, gues, the computer should tell the user if the guess is too high or too low or is correct. 3. Using nested for loops, right a program that displays a bar chart (using asterisks) for a number entered by the user. For example, if the user enters 4, the bar chart looks like this:
- Write a program that requests the current time and a waiting time as two integers for the number of hours and the number of minutes to wait. The program then outputs what the time will be after the waiting period. Use 24-hour notation for the times. Include a loop that lets the user repeat this calculation for additional input values until the user says she or he wants to end the program. Input Notes:Both the current time and the waiting time are entered in the form HH:MM where HH and MM are integers signifying hours and minutes respectively. In response to the continuation prompts (described below) the user types a y or a Y to signify "continue" with any other character signifying "quit". Output Notes (Prompts and Labels):At the outset the program prints the title "Compute completion time from current time and waiting period". The program then prompts for the current time with the prompt "Current time:" followed by the instructions "Enter 24 hour time in the format HH:MM". After…Write a program using a while loop repitition statement that will print numbers 2,4 ,6 ,8 ,10 ,12 ,14 ,16 and also print the sum of these numbers. Name this program while.cpp.Write a program that uses a while loop to do the following: Repeatedly asks the user to enter a number or -1 to exit the program. Keeps track of the smallest and largest numbers entered so far: You will need a variable for the smallest number and another variable for the largest number. Read the first number the user enters, and if it is not -1 set the smallest and largest variables to that number. Use a loop to gather the remaining input. Each time the user enters a new number that is not -1, compare it to the variables and update them if necessary. When the user enters -1, display the smallest and largest numbers that the user entered. If the user did not enter any numbers before entering -1, then simply exit the program. Run the program and test it on several different sets of values to see if it works. Modify the program to ask the user how many numbers they wish to enter and use a for loop to ask for that many numbers. The sentinel value of -1 should no longer be necessary.
- loop-2.py In your program ... Ask the user for a small number. see hints Welcome to our counting program. Then, ask the user for a larger number to count up to. *see hints It also adds up the digits that you count! Please enter a small number, 0 or higher: five Your program should use a for loop and the range function to print the numbers counted, and add each one to the next, from the small number to the large number. Display the total in a good-looking print statement as shown. Please enter a whole number only: 5 Now, enter a larger number that you want to count up to: 3 Enter a whole number greater than your start number (5): 10 08 6. 7 *Hint 1: the two user-defined numbers will become the start and stop values for your range 9. 10 function. The total of all the numbers you counted is: 45. *Hint 2: int validation required. In addition to requiring whole numbers for both inputs, the second number has to be greater than the first number.Answer the ff looping problems- WHILE LOOP 1. Allow the user to input integer values and sum up all the inputted values. The loop will be terminated if the user input ZERO (0). 2. Interest is compounded annually at 10% by a certain bank. Create a program that will allow input an amount and a number of years and output how much the original amount will be worth after the period. Each transaction is tagged as customer #(Maximum of 10 customers only).Write a program that prompts the user to enter the number of students and each student’s name and score, and finally displays the student with the highest score (display the student’s name and score). Also calculate the average score and indicate by how much the highest score differs from the average. Use a for loop. Test Data: Ben Simmons 70 Carson Wentz 80 Joel Embiid 90 Bryce Harper 75 Redo Problem A. Replace the for loop with a while loop
- Write a complete program that: 1. Uses a do...while loop to prompt the user to enter a count that is greater than 1 and less than or equal to 20 then reads in a count from the keyboard as an integer. a. If input error occurs or the count the user enters is less than or equal to 1 or greater than 20, output an error. After outputting an error, clear/ignore the failed input and continue do...while looping until a valid number is entered. 2. Writes a triangle to the display using for loops. The triangle will be upside down. To write this triangle to the display: amountOfStars = number entered in (1). a. b. Output amountOfStars followed by a new line. C. Decrement amountOfStars by one. d. Continue from (b) until amountOfStars is zero. 3. Writes a triangle to the display using while loops. The triangle will be rightside up. To write this triangle to the display: a. amountOfStars = 1. b. Output amountOfStars followed by a new line. C. Increment amountOfStars by one. d. Continue from (b)…1. Write a program that reads an integer from the user. Then your program should display a message indicating whether the integer is even or odd. 2. A string is a palindrome if it is identical forward and backward. For example "anna","civic","leveľ"and“hannah"are all examples of palindromic words. Write a program that reads a string from the user and uses a loop to determines whether or not it is a palindrome. 3. Write a program that reads integers from the user and stores them in a list. Yourprogram should continue reading values until the user enters 0. Then it should display all of the values entered by the user (except for the 0) in order from smallest to largest,with one value appearing on each line. 4. Two words are anagrams if they contain all of the same letters, but in a differentorder. For example, "evil" and “live" are anagrams because each contains one 'e', one 'i', one l', and one 'v'. Create a program that reads two strings from the user, determines whether or not they…1. Write a program that reads an integer from the user. Then your program should display a message indicating whether the integer is even or odd. 2. A string is a palindrome if it is identical forward and backward. For example “anna",“civic",“level"and“hannah"are all examples of palindromic words.Write a program that reads a string from the user and uses a loop to determines whether or not it is a palindrome. 3. Write a program that reads integers from the user and stores them in a list. Yourprogram should continue reading values until the user enters 0. Then it should display all of the values entered by the user (except for the 0) in order from smallest to largest,with one value appearing on each line. 4. Two words are anagrams if they contain all of the same letters, but in a differentorder. For example, "evil" and “live" are anagrams because each contains one 'e’, one 'i’, one l’, and one 'v’. Create a program that reads two strings from the user, determines whether or not they are…