Write a program which repeatedly reads numbers until the user enters "done". Once "done" is entered, print out the count, sum and average of the numbers entered. If the user enters anything other than a number, detect their mistake using try and except and print an error message and skip to the next number.
Q: how each important principle from the cybersecurity discipline is applied to overall system security
A: Intro Cybersecurity: It is an implementation made for protecting computers, network and information…
Q: Explore the concept of abstraction by comparing and contrasting it with some instances drawn from…
A: Our assignment: The debate center's on the significance of abstraction in software engineering and…
Q: Think about the function of wireless networks in nations that are still developing. Certain…
A: Answer: Families using many electronic devices, such as computers, laptops, and other mobile…
Q: ysis. Is it possible to raise the overall quality of the code that is generated as a consequence of…
A: Introduction: Displaying the software process utilizing a abstraction called a Software Model. The…
Q: The greatest articles are those that can be found in the ACM Digital Library (DL) or the IEEE…
A: Start: Choose a published paper (from ACM DL or IEEE CSDL) on a Network Operating System topic (For…
Q: What are the desired results of the creation of software? Do you think it would be useful to add…
A: Given: The process of creating, designing, deploying, and maintaining software is referred to as…
Q: How exactly does the existence of resident monitors lead to improvements in the functioning of the…
A: A computer's functions generally involve the following tasks: data collection, processing, delivery…
Q: What would you say are the three most important elements that make up an information system?
A: Given Data: Please list three facets of Information System Information systems include three…
Q: What are some of the various software testing techniques that are utilized in the creation of…
A: Explain the software engineering testing methods. The tests include: Tests Unit 1Focus on software's…
Q: Q.1: MIPS is an architecture having its own Assembly Language. You are learning x86 assembly…
A: The answer as given below:
Q: haring systems
A: Highlights of time-sharing operating systems A time-shared operating system utilizes CPU scheduling…
Q: actions would you take to fix a computer
A: No operating system or piece of software is immaculate; there will generally be an issue while…
Q: What exactly is the function of a command and control system?
A: In C++, there are two types of control structures: The flow control is determined by the control…
Q: Imagine for a moment supposing there were no computers or the internet. How different would our…
A: Given: In a world without the internet, you'd be using a traditional chequebook and phoning your…
Q: What is the function of a firewall, and how do you set one up?
A: Given: What is a firewall's purpose, and how do you set one up?
Q: Give some guidelines on how to properly cite sources. What are the consequences of stealing someone…
A: Lounch: Provide some criteria for citing sources. What are the ramifications of plagiarizing?…
Q: What are the benefits and drawbacks of having data processing carried out in a decentralized…
A: Define: A distribution system is a collection of networked computers that works together to solve a…
Q: Using Rational Rose and taking into consideration all the required specifications, draw the…
A: According to the bartleby guidelines we can answer only three subpart in case of multiple questions.…
Q: What are some of the most frequent computer programs that are used to solve the issue of the least…
A: Definition: List some of the most common computer applications of the minimal spanning tree issue. A…
Q: How would you characterize Centos in terms of server operating systems, and how does it differ from…
A: Introduction: CentOS is also called CentOS Linux is a Linux distribution that provides a free and…
Q: Nanotechnology has the potential to have a large influence on the treatment of sickness, the mending…
A: Introduction: If nanotechnology could help humans live longer than they do now, then it would…
Q: What is the output of Loop 1? for (var i-0; i<5; i++) { console.log(i); } console.log(i); When this…
A: In loop1, we have used var for declaration and in loop2, we have used let for declaration var scope…
Q: Please provide an explanation of the several methods and choices that may be used while building and…
A: Definition: Horizontal scalability is achieved via distributed databases, which are intended to…
Q: sing arrays, write a C++ program that will let a user input the array size (how many elements).…
A: Algorithm to sort the elements and their sum and average Input an array of length n. First add all…
Q: 3. Write a program that prompts the user for a file name, assuming that the file contains a Java…
A: Program Algorithm: 1. File import creates new file 2. Inside the try loop the scanner reads the…
Q: Write c program to print all even numbers from user entered array of length of 10 elements Thank…
A: Prime number is a number that is greater than 1 and divided by 1 or itself.
Q: What's the difference between Oops and functional programming, exactly?
A: Define: Functional programming stresses programme creation and usage while developing software.…
Q: What is parallel connection?
A: In this question we have to understand and discuss what is parallel connection. Let's understand
Q: Supply your answer by drawing the convex hull and then uploading the graphic using the file upload…
A: Answer: For this, we use the Jarvis march algorithm. Jarvis march algorithm: The idea of Jarvis’s…
Q: Are you familiar with the applications of dynamic programming?
A: Define: The method of dynamic programming is one that is used in the process of issue optimization.
Q: What are the implications if the change brought on by cloud computing has an effect on…
A: Cloud Collaboration Cloud collaboration allows employees to communicate on documents and other data…
Q: Which of the following four kinds of information systems are the most frequent, and how can you tell…
A: Information system: Transaction processing systems, management information systems, decision-support…
Q: Which two IPv4 and IPv6 features can you name?
A: Features of IPv4 address : 1) The size of IPv4 address is 32-bits 2) IPv4 address can be divide into…
Q: What is the default location for the ISO file when it is made automatically?
A: Introduction: ISO files is additionally known as ISO image. ISO images are utilized for…
Q: ou think the internet and other forms of social media have had on society as a whole? Why do you…
A: The greatest positive effect of the internet on society is the prevalence of social networks and…
Q: How does the organization of a solid-state drive (SSD) vary from that of a magnetic disc? What…
A: Required: In terms of organisation, how does an SSD differ from a magnetic disc? What makes them…
Q: What kind of worries and challenges arise from the use of an unintegrated information system?
A: Introduction: Computer failure and loss are key issues resulting in unnecessarily high costs and…
Q: It is important to keep in mind that altering the accept and non-accept states might potentially…
A: Introduction As a result, like your own language, the complement of your tongue would be…
Q: What are the many different software testing approaches that are utilized in software engineering,…
A: Explain software engineering testing procedures and why they exist: Functional testing vs.…
Q: List At least three registers designed specifically for use by the floating-point unit.
A: Given: The instruction is executed using the floating-point register. There are 32 64-bit…
Q: If a computer uses a control method known as microprogrammed control, the microprogram is the one…
A: Introduction Here, one computer is using a control system which is microprogrammed. So, the…
Q: How many distinct classifications of information systems are there in your mind?
A: Introduction: Information system: An information system is an integrated system that is intended…
Q: .How many bits are stored in 1KByte of memory?
A: Given memory is 1KByte Now converting the given memory into bits 1KByte => 210 Byte…
Q: A single-threaded program cannot be deadlocked, and this is because one of the conditions of…
A: Hold and Wait is the condition that a single-threaded program cannot be deadlocked if broken.
Q: Identify at least two (2) benefits of using OOP instead of PP alone.
A: Introduction: Procedural programming consists of the following steps: - They are structural…
Q: Is it even feasible to describe how the development of integrated circuits led to the creation of…
A: Yes, Is it possible to tell integrated circuits led to the creation of microcomputers The…
Q: Why are there firewalls in place, and what are they for?
A: Introduction: A firewall is a network security device that analyses incoming and outgoing network…
Q: What kind of societal and ethical ramifications can technologies like artificial intelligence and…
A: Given: Artificial intelligence is a branch of computer science that involves developing computer…
Q: How can we classify the many kinds of information systems?
A: Information System A collection of various pieces of equipment used in the collecting, processing,…
Q: What are the many different software testing approaches that are utilized in software engineering,…
A: Explain several software testing techniques used in software engineering, their purpose, and…
Python
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Challenge Problem python G U E S S T H E N UM B E R Write a program that plays a guessing game with the user. The program should have the right answer set to 13, then prompt the user repeatedly to guess the number from 1 to 25. When the user guesses incorrectly, the game should give the user a hint about whether the correct answer is higher or lower than the guess. Once the user guesses correctly, the program should print a message showing the number of guesses that the user made. Note : This assignment involves the use of a while loop and if-else decision making controls. You CANNOT use the reserved keywords break and continue for any portion of this program or any program for that matter throughout this course.Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Ex: When the input is: 15 20 0 5 -1 the output is: 10 20 You can assume that at least one non-negative integer is input. This is the code I am using: import java.util.Scanner; public class LabProgram {public static void main(String[] args) {Scanner input = new Scanner(System.in);int[] a= new int[100];int i=0, sum=0;double avg, max=0;while(true){a[i]=input.nextInt();if(a[i]<0)break;elsesum=sum+a[i]; // sum the numbersi++;}avg=(double)sum/i; //compute averagefor(int j=0; j<i;j++)if(max<a[j])max=a[j];System.out.printf("%.2f %.2f\n", avg,max); // print result}} These are the outputs I am getting and I cannot figure out how to remove the decimal. Input 15 20 0 5 -1 Your output 10.00 20.00 Expected output 10 20 Input 2 2 2…Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Ex: When the input is: 15 20 0 5 -1 the output is: 10 20 You can assume that at least one non-negative integer is input. import java.util.Scanner; public class LabProgram {public static void main(String[] args) {Scanner scnr = new Scanner(System.in);int numValue;int average;int max;int numValues;int numTotal;numTotal = 0;numValues = 0;max = 0;numValue = scnr.nextInt();while (numValue > 0){numTotal = numTotal + numValue;numValues = numValues + 1;numValue = scnr.nextInt();}average = numTotal / numValues;System.out.print(average);while (numValues > max){max = numValues;System.out.print(" " + max);} }} Why is it giving me the wrong output??
- Java - Help Please How do I output this statement as a horizontal statement with a newline? Everytime I use System.out.println, it makes the entire output vertical instead of horizontal. Program below. import java.util.Scanner; public class LabProgram { public static void main(String[] args) { int x; int y; Scanner scan = new Scanner(System.in); x = scan.nextInt(); y = scan.nextInt(); if(y >= x){ for(int i=x; i<=y; i = i + 5) { System.out.print(i+ " "); (The problem line) } } else{ System.out.print("Second integer can't be less than the first."); } }}(PYTHON) A Krishnamurthy number is a number which sum of the factorial of its digits is equal to the number itself. For example: Let us consider the number 145. Factorial sum = 1! + 4! + 5! = 1 + 24 + 120 = 145. Therefore 145 is a Krishnamurthy number. Other examples include: 1, 2, 40585. Write a program that does the following: • asks the user to input an integer. • computes whether the number is a Krishnamurthy number. • then finally prints the result. Note: You are not allowed to use the built-in function math.factorial.USE PYTHON A small shop sells 280 different items. Each item is identified by a 3 – digit code. All items that start with a zero (0) are cards, All items that start with a one (1) are sweets, All items that start with a two (2) are stationery and All items that start with a three (3) are toys. Write a program which inputs the 3 – digit code for all 280 items and outputs the number of cards, sweets, stationery and toys.
- Help! (In Python). Please dont use chatgpt Sales Tax CalculatorCreate a program that uses a separate module to calculate sales tax and total after-tax.Example runtime. User input is italicized for the example. Allow the user to enter their own input: Sales Tax Calculator ENTER ITEMS (ENTER 0 TO END)Cost of item: 35.99Cost of item: 27.50Cost of item: 19.59Cost of item: 0Total: 83.08Sales tax: 4.98Total after tax: 88.06Again? (y/n): y ENTER ITEMS (ENTER 0 TO END)Cost of item: 152.50Cost of item: 59.80Cost of item: 0Total: 212.3Sales tax: 12.74Total after tax: 225.04Again? (y/n): nThanks, bye! The sales tax should be 6% of the total amount.In a module, save the sales tax rate. This module should additionally provide functions for calculating sales tax and total after-tax. The results of these functions should be rounded to a maximum of two decimal places.In the main() method, store the code that receives input and shows output. When you think it will make the code easier to read and…[Python Language] [Python Language] Is it time for tea?Your friend lives in London England in a timezone that is normally 6 hours ahead of Toronto Canada. But sometimes London and Toronto switch to daylight savings time on different dates. If Toronto is on daylight savings time and London isn’t, then the time difference is only 5 hours. Conversely, if London is on daylight savings time and Toronto isn’t, the time change is 7 hours. Of course, if both are on daylight savings time, the difference is back to the standard 6 hours. Write a program that takes three lines of input: a float value representing the time in Toronto, whether Toronto is on daylight savings time (1 means yes, 0 means no), and whether London is on daylight savings time (1 means yes, 0 means no). It prints a float giving the time in London. One complication is that you should not print a time greater or equal to 24.0 or less than 0.0. Suggestion: At first don’t consider this complication, and test cases where the…(Python) Please write a program that creates steps. You are expected to take in a single positive integer which will be used as the number of steps in your staircase. The program only accepts integers greater than 0 and less than 500. If 0 is entered a message stating "Your staircase has no steps." and if the user enters a value greater than or equal to 500, a message stating "I can't build a staircase that tall." For all other values not within the valid range or not integers an "Invalid staircase size provided." will be displayed to the user. The program will always run only once for each user input. One thing to note, the messages should be the return string from your createSteps() function and printed from the calling function. Additional Requirements: 1. The very first step in the stair case will be left aligned and for each subsequent level the step will move above and to the right of the prior step. 2. There are no spaces after the right of any of the steps. 3. The bottom most…
- (Python) Please write a program that creates steps. You are expected to take in a single positive integer which will be used as the number of steps in your staircase. The program only accepts integers greater than 0 and less than 500. If 0 is entered a message stating "Your staircase has no steps." and if the user enters a value greater than or equal to 500, a message stating "I can't build a staircase that tall." For all other values not within the valid range or not integers an "Invalid staircase size provided." will be displayed to the user. The program will always run only once for each user input. One thing to note, the messages should be the return string from your printSteps() function and printed from the calling function. Additional Requirements: The very first step in the staircase will be left-aligned and for each subsequent level, the step will move above and to the right of the prior step. There are no spaces after the right of any of the steps. The bottom-most row ends…Python Programming The Fibonacci sequence starts 1, 1, 2, 3, 5, 8, . ... Each number in the sequence (after the first two) is the sum of the previous two. Write a program that computes and outputs the nth Fibonacci number, where n is a value entered by the user.Write a math program that can be used as a math tutor. It will generate two random numbers and display it like this: 154 +683 ------- Enter the answer: The program should wait for the student to answer and fill in the blank space. If they're right it will say congrats the answer is __ or sorry that's incorrect the answer is __ .