Conditional Statements and Loops 3. Write a Python or C++ program to guess a number between 1 to 9. Note: The user is prompted to enter a guess. If the user guesses wrong then the prompt appears again until the guess is correct, on a successful guess, the user will get a "Well guessed!" message, and the program will exit.
Q: e do processor consistency and FIFO consistency differ
A: Every writing exercise is split into smaller portions so that reading can begin simultaneously with…
Q: Therefore, why isn't an object's presence in a data model required?
A: Target schemas are used to store data in the Oracle Warehouse Builder data system. Tables, views, 3D…
Q: Exists a clear distinction between one configuration of a software product and another? Should we…
A: Configuration of the product: Configuring a Product The process of selecting and combining…
Q: Do you have any feedback on how we assess software structures?
A: Structural testing is basically related to the internal design and the implementation of the…
Q: If you're disabled, how do you believe the internet can benefit you? Do you have any ideas on what…
A: Answer: For persons with disabilities, the internet makes life better. They have access to the…
Q: There are other methods available to stop the progress of a process, but "interrupt" and "traps" are…
A: According to the question, a trap is an operating system signal from a user application. Hardware…
Q: What does the organizational structure include, exactly?
A: Operational hierarchy: Many arithmetic operations are merged into a single phrase in a hierarchy of…
Q: Clarifying the purpose of firewalls in network security and protection is essential. Don't forget to…
A: The significance of a firewall To begin, may we investigate the rationale for the firewall? I have a…
Q: Discuss the pros and cons of using pre-made software instead than developing your own program from…
A: The following are some advantages of software packages: Through the use of application software…
Q: Describe how an HTTP request, whether it's arriving or departing, is blocked by a stateless…
A: The firewall filters network traffic based on user-defined rules. A firewall blocks undesired…
Q: Using common language when discussing network measurements might help enhance their quality.
A: When assessing or improving network performance, you may investigate many parameters. Several things…
Q: How can designers of user interfaces do a hierarchical task analysis? Describe the procedure's seven…
A: Analysis of Hierarchical Tasks By taking a formal objective approach to the way users define task…
Q: Method of the system for detecting invasions
A: It is a security approach designed to protect an internal network from unauthorised servers and…
Q: What tasks should be carried out by the minimal kernel of your operating system initially?
A: A crucial component of an operating system, the kernel is responsible for managing all of the…
Q: Can those who have physical limitations still use the web? In what ways do you believe the newest…
A: In this question we have to answer the given questions Can those who have physical limitations still…
Q: Simply put, what is a boolean expression?
A: A statement that can only be true or false is referred to as a boolean expression. Programming and…
Q: When doing an analysis, how important is it to use data modeling? How can we determine what data…
A: Importance of data model helps in interaction of the designer, the programmer, and the end…
Q: Why do we talk about "fine-grained multithreading?"
A: It is described as the capability of the central processing unit (CPU) to provide numerous threads…
Q: Why is it necessary to have an operating system for a server?
A: The accompanying sections provide a quick explanation of the server operating system's function as…
Q: What should be the overarching philosophy while developing the microkernel of an OS? What is the…
A: The users services are kept in the users address spaces, and kernel services are kept under the…
Q: The following is the definition of Conferency Control: This is important for the following reasons:
A: Database Management System (DBMS) stores and retrieves user data using security safeguards. It…
Q: Describe what ISA is and the several kinds of ISA that exist, such as R-type and J-type ISA. The…
A: ISA An instruction set architecture is ISA. These instruction sets are combinations of commands that…
Q: As they work, computers emit heat. Do you have any questions concerning computer air conditioning?
A: They manage workplace elevators, heating and cooling systems, parking lot video monitoring,…
Q: 1. Which of the following is not an area of artificial intelligence research ( ) a. Machine…
A: As per our guidelines, we are supposed to answer only 1st three questions. Kindly repost the…
Q: Data storage strategies are different across decentralized and centralized version control systems.…
A: Introduction: The process of managing and monitoring changes to software code is known as version…
Q: The Differences Between Transmission Control Protocol and User Datagram Protocol Software…
A: Provide two applications where you would utilise TCP instead of UDP as a software architect. The TCP…
Q: Whether your computer is running slowly, you may want to investigate its resource use to see if a…
A: The resources used by apps include CPU, RAM, hard drive, virtual memory, network bandwidth, etc.…
Q: Imagine a histogram (bar graph). Design an algorithm to compute the volume of water it could hold if…
A: Looking at the highest bar, which is a size 8, first. What function does that bar serve? Although it…
Q: Whether or whether businesses ought to have their every technological need met by external software…
A: Introduction: When a company uses rethinking, it hires other firms to do specific tasks. Companies…
Q: Do you know that the combination of computers, telecommunications, and media led to the creation of…
A: Introduction: Disruptive technology is a ground-breaking product that creates a new industry or…
Q: Is it true that you are familiar with the three DHCP packets required to initiate the protocol's…
A: The protocol procedure requires three different DHCP messages arrow forward. It is the initial…
Q: If one department makes a change that impacts another, what complications could arise with the…
A: Database indexes requires constant updates and modifications. Without are gular maintenance, indexes…
Q: Write short notes on the following and give at least four examples each x. Machine Numbers xi.…
A: Write short notes on the following and give at least four examples each x. Machine Numbersxi.…
Q: It might be wise to investigate the use of Structured English in analytical approaches that don't…
A: Systems Methodology: The term "systems methodology" refers to a procedure that is comprised of both…
Q: Depending on the specifics of your setup, a change in implementation might improve or decrease your…
A: Even among reliable operating systems, quality varies. An OS may be trustworthy for one task but not…
Q: Would you mind providing some feedback on the database's file structure?
A: A database file system is a method of classifying files in a storage location, such as a hard drive.…
Q: Is there a specific function for which operating systems were created?
A: The following are the goals that the operating system is trying to accomplish: Order to facilitate…
Q: Plan-makers need some talk time. Why use a scheduler that looks that far ahead?
A: A scheduler is software that enables an organization to schedule and monitor computer batch…
Q: semaphore or a system rations wer the final va
A:
Q: Explain what two types of firewalls you have seen at the network layer.
A: Network layer: The layer 3 of the OSI model, known as the network layer, is in charge of packet…
Q: How would you define a release mechanism in the context of software engineering? What does version…
A: A software application's latest or most complete version is distributed as a release. A software…
Q: Computer graphics is a handy technique or tool for delivering computer-generated charts, diagrams,…
A: The discipline of computer graphics may be seen as a subfield of computer science that is…
Q: Does a catalogue and a data dictionary differ structurally?
A: A data catalogue serves as a single context, control, and collaboration layer of all metadata…
Q: I'm confused about the distinction between dynamic and static memory.
A: Introduction: Multiprocessing: In computer science, the calculating method is referred to as…
Q: In the context of other server OSes, please describe CentOS and its features.
A: CentOS is a server operating system that is also a very excellent desktop operating system due to…
Q: Do you know what a typical operating system's kernel consists of?
A: A kernel is main heart of system which has full control over system. Kernel directly interacts with…
Q: The lexicon of computer science contains terms such as Data Dictionary and Contrast Repository.
A: A Data Dictionary is a component of a Database Management System that describes how a database is…
Q: [6.2] The number 1071.73 is represented in IEEE 754 standard double precision. What is the result in…
A: In this question we have to convert and understand the conversation of a number and represented in…
Q: What is the purpose of intrusion detection?
A: An Intrusion Detection System (IDS) is a system that analyses network traffic for unusual behavior…
Conditional Statements and Loops
3. Write a Python or C++
Step by step
Solved in 2 steps with 3 images
- (Mathematical functions) Write a program that calculates and displays values for y when y=xz/(xz) Your program should calculate y for values of x ranging between 1 and 5 and values of z ranging between 2 and 6. The x variable should control the outer loop and be incremented in steps of 1, and z should be incremented in steps of 1. Your program should also display the message Function Undefined when the x and z values are equal.C++ Programming: Instructions The program in Example 5-6 implements the Number Guessing Game. However, in that program, the user is given as many tries as needed to guess the correct number. Rewrite the program so that the user has no more than five tries to guess the correct number. Your program should print an appropriate message, such as “You win!” or “You lose!”. Code Given: //Flag-controlled while loop. //Number guessing game. #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int num; //variable to store the random number int guess; //variable to store the number guessed by the user bool isGuessed; //boolean variable to control the loop srand(time(0)); num = rand() % 100; isGuessed = false; while (!isGuessed) { cout << "Enter an integer greater" <<" than or equal to 0 and " <<"less than 100: "; cin >> guess; cout << endl; if (guess == num) { cout << "You win! " <<…The distance a vehicle travels can be calculated as follows:distance = speed * time. For example, if a train travels 40miles per hour for 3 hours, the distance traveled is 120 miles.Write a program that asks the user for the speed of a vehicle(in miles per hour) and how many hours it has traveled. Theprogram should then use a loop to display the distance thevehicle has traveled for each hour of that time period. c++ code
- A Charge Account Statement Write a program to prepare the monthly charge account statement for a customer of CS CARD International, a credit card company. The program should take as input the previous balance on the account and the total amount of additional charges during the month. The program should then compute the interest for the month, the total new balance (the previous balance plus additional charges plus interest), and the minimum payment due. Assume the interest is 0 if the previous balance was 0 but if the previous balance was greater than 0 the interest is 2% of the total owed (previous balance plus additional charges). Assume the minimum payment is as follows: new balance for a new balance less than $50 $50.00 for a new balance between $50 and $300 (inclusive) 20% of the new balance for a new balance over $300 So if the new balance is $38.00 then the person must pay the whole $38.00; if the balance is $128 then the person must pay $50; if the balance is $350 the minimum…C++ Visual Studio Modify the following program so it displays a menu allowing the user to select an addition, subtraction, multiplication, or division problem. The final selection on the menu should let the user quit the program. After the user has finished the math problem, the program should display the menu again. This process is repeated until the user chooses to quit the program. Input Validation: If the user selects an item not on the menu, display an error message and display the menu again. Code: #include <iostream>#include <cstdlib>#include <ctime>#include <conio.h> using namespace std; int main() {srand(static_cast<unsigned int>(time(nullptr))); while (true) {// Generate two random numbers.int num1 = rand() % 1000;int num2 = rand() % 1000; // Display the problem.cout << "Solve the following math problem:" << endl;cout << num1 << " + " << num2 << endl; // Wait for user input to reveal the answer.cout <<…Car sales commission problem - For each used car a salesperson sells, the commission paid is as follows: $20 plus 30% of the selling price in excess of the cost of the car. Typically, the minimum selling price of the car is the cost of the car plus $200 and the maximum selling price is the cost of the car and $2,000. Write a program that prompts the user to enter the salesperson’s fixed commission, the percentage of the commission, the purchasing cost of the car, the minimum and the maximum amount to be added to the purchasing cost to determine the minimum and the maximum selling price, and outputs minimum and maximum selling price of the car and the salesperson's commission range. As a suggestion, pay particular attention to the formulas would your being requested. I would recommend that you perform the calculations on paper or in Excel prior to programming the solution. Paint usage calculator -A room has one door, two windows, and a built-in bookshelf and it needs to be painted.…
- Financial application: compute future apartment rent) Suppose that the rent for an apartment is $1000 thisyear and increases 3% every year. Write a program that computes the rent in five years and the total rent forone year starting five years from now.Exercise 6: Write a C++ program that displays the following menu: Geometry calculator 1. Calculate the area of a Circle 2. Calculate the area of a Square 3. Quit 4. Enter your choice (1-3): If the user enters one, the program should ask for the radius of the circle and then display its area. Use the following formula: area=r₂ where r is the radius and = 3.14159. If the user enters two, the program should ask for the length of the square's side and then display its area. If the user enters three, the program should end. Display an error message if the user enters a number outside the menu range or negative values in all options. C:\Users\medhatha\Desktop\c++\menu\Debug\menu.exe Geonetry calculator 1. Calculate the area of a Circle 2. Calculate the area of a Square 3.Quit Enter your choice (1-3): 2 Enter the length of the squares side 4 Area of the square = 16 Press any key to continue . . . C:\Users\medhatha\Desktop\c++\menu\Debug\menu.exe Geonetry calculator 1. Calculate the area of a…Python Programming Only Please: Write a program that asks the user to enter a person’s age. The program should displaya message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: • If the person is 1 year old or less, he or she is an infant.• If the person is older than 1 year, but younger than 13 years, he or she is a child.• If the person is at least 13 years old, but less than 20 years old, he or she is a teenager.• If the person is at least 20 years old, he or she is an adult.
- C++ Programming only 17. Continuous Inputs by CodeChum Admin Write a program that will keep asking the user to input integers until he inputs -1, or the sum of all inputs have reached or exceeded 2000. When the sum has exceeded 499, print "You're off to a good start!". When the sum exceeds 999, print "You're halfway through!". Finally, when the sum exceeds 1499, print "You're almost there!". If the program ended because of an input of -1, print "Program was terminated. Your total sales are: " and then the actual value of the total sales. Otherwise, print "Congratulations! Your total sales are: " Input 1. Series of integer inputs Description Several integer inputs that will either reach a sum of 2000, or ends with a -1. Sample 500 200 100 -1 Output The output depends on the inputs. Refer to the Problem Description for the messages to be printed. Enter·value:·500 You're·off·to·a·good·start! Enter·value:·200 You're·off·to·a·good·start! Enter·value:·100…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.Python The month of February typically has28 days except when it is a leap year, in which case February has 29 days.Write a program that asks the user to enter a year. The program should then display the number of days in February that year. Use the following criteria to identify leap years: The program shall loop back to ask the user to enter another year. The program shall NOT display the original display message explaining what the program does If the user enters an invalid year, the program willdisplay an error message to the user and prompt for a year If the user enters 0 or hits return for the year, then the program terminates