The objective of this program is to demonstrate your proficiency with the if-elif-else construct. Your program will consist of a simple guessing game. Using the random module, generate an integer between 1 and 10. This will be the secret. You will then ask the user for a guess between 1 and 10. . If the guess is greater than the secret respond, "Too high". • If the guess is less than the secret respond, "Too low". • If both numbers are equal respond, "Success!". Remember to test your program to ensure that all of the comparisons work. Please note that a loop is not required. The images below shows the program being run multiple times to display the three different possible output messages.
Q: When and why should you use a throw statement instead of a throws clause?
A: Introduction: The ‘throw’ keyword is utilized only when we need to throw an exception and are…
Q: The essential features of an OS should be summed up in a single sentence.
A: In this question we have to understand the essential features of OS. Let's discuss
Q: Do you know of any good Windows Service Control Manager tutorials or reference materials?
A: Introduction: The Service a Control Manager (SCM) is one of the numerous features that are included…
Q: What advantages and disadvantages does ict have for society as a whole?
A: Please see the solution below: Answer: Technology has improved civilization and also caused harm. On…
Q: Analyze the differences and similarities between cellular, wireless, and wired data transfer.…
A: Portability depicts how far you can travel despite everything have the option to get to arrange…
Q: Mention three tools or technics that are used in data modeling in designing a system Why do we use…
A: three tools or technics that are used in data modeling in designing a system - 1. MySql Workbench 2.…
Q: When it comes to a local area network, what precautions should be taken to ensure its availability…
A: LAN is also known local area network.
Q: structure. Create a menu with that gives the user three choices: Grade Book Grade Book O: Exit 1:…
A: Python program to implement a gradebook application''' # create an empty list of gradesgrades = []…
Q: Why is a virtual private network (VPN) better for security than the public internet? But things…
A: Accessing a VPN is safer than using the public Internet, and VPN tunnel mode is effective.
Q: Although it is debatable why non-interrupted systems perform poorly, interrupt-driven systems…
A: Interrupt Driven: When there are no I/O transfers that need the CPU's immediate attention, devices…
Q: When and why do ict's benefits and drawbacks become apparent to the public?
A: Information and communication: Technology, or ICT, is essentially a computer-based technology for…
Q: Discuss how data mining may be used to achieve various goals.
A: INTRODUCTION: Information mining could be a handle utilized by companies to turn crude information…
Q: Kindly point me in the direction of further information regarding Windows Service Control Manager.
A: Given: Service Control Manager (SCM) is a unique system function in the Windows NT family of…
Q: The way Ubuntu Server looks and feels sets it apart from competing server operating systems.
A: Encryption: The server of operating system known as Ubuntu Server was developed by Canonical and…
Q: Seek for actual implementations of design patterns and defend their quality.
A: INTRODUCTION In this question, we are asked to Seek actual implementations of design patterns and…
Q: We don't know how operating systems accomplish their goals. What does it mean when we speak about a…
A: The answer to the question is given below:
Q: In what other ways has the use of ICT benefited us, and what ways has it hindered us?
A: Introduction: ICT: ICTs stand for Information and Communication Technologies and are defined, for…
Q: Discuss how performance optimizations for file systems might result in difficulties in maintaining…
A:
Q: The security of a virtual private network (VPN) surpasses that of public Wi-Fi (VPN). When using a…
A: According to the information given:- We have to define the security of a virtual private network…
Q: When two stations are visible at once, or if one station is hidden from view, wireless networking…
A: The wireless network refers to the computer network that makes use of the Radio Frequency (RF)…
Q: Can technology be utilized in some manner to enhance learning? My outlook on many different issues…
A: Information and communication technology boosts educational effectiveness. Business students would…
Q: Exactly what tasks do operating systems primarily serve to perform?
A: We will explore the most vital responsibilities an operating system must fulfill. We shall explore…
Q: Use JavaScript to program a Magic Eight Ball.
A: What is magic-8 ball program: It's a program that, each time you run it, flashes a different…
Q: The nature of wireless networks causes a variety of complications. List three of these problems and…
A: Network problem Connectivity problems There are connection problems. It is irritating when you…
Q: What motivates developers to create a microkernel for an OS? Is this method dissimilar to the…
A: Given: What principle underlies the development of the microkernel in an operating system? What…
Q: How have the advantages and disadvantages of ICT been felt by the general public?
A: ICT stands for Information and Communication Technology. ICT is the modern day infrastructure,…
Q: Most frequent pattern mining algorithms consider only distinct items in a transaction. However,…
A: The Answer is :-
Q: Provide a comprehensive breakdown of the kernel of an operating system, outlining its many…
A: Given: We have to discuss Provide a comprehensive breakdown of the kernel of an operating system,…
Q: There are a number of issues that must be addressed because of the nature of wireless networks. You…
A: network problem Connection problem There are connection issues. It might be annoying when you can't…
Q: Show via examples why interrupt-driven operating systems perform better overall than…
A: Introduction: This question implies that interrupt-driven operating systems perform better than…
Q: 17.Write a Java program that prompts the user to input an integer greater than 0 which represents…
A: Given: We have Write a Java program that prompts the user to input an integer greater than 0 which…
Q: Think about how you may describe processes that aren't addressed in a systems analysis using…
A: the solution is an given below :
Q: You've discovered that an unauthorized user or users accessed sensitive customer data from your…
A: Unauthorised access to a computer's: information, applications, networks, or devices constitutes a…
Q: The difference between deterministic and non-deterministic computers according to their purpose and…
A: Deterministic algorithm Non-deterministic algorithm Algorithms in which the result of each…
Q: Think about the benefits and drawbacks of introducing wireless technology. To ensure smooth…
A: The usage of wireless technology eliminates the need for any kind of wires or cables in order to…
Q: JAVA Write a java program using streams to get the longest string from the list by using lambda…
A: Lambda expression is a short block of code which takes in parameter and return a value. A stream is…
Q: Global positioning system is shortened to "GSM." Why do you need a SIM card for your cell phone?
A: Given To know about the GSM and SIM card requirement in phone.
Q: Because of its distinctive features and capabilities, the Ubuntu Server Operating System stands out…
A: Running System: In actuality, an operating system (OS) is a kind of system software in charge of…
Q: What distinguishes Ubuntu from other server operating systems, and what features does it share with…
A: Based on Debian GNU/Linux, Ubuntu is a free and open-source operating system (OS). Ubuntu combines…
Q: In what other ways has the use of ICT benefited us, and what ways has it hindered us?
A: ADVANTAGES OF ICT USE IN BUSINESSES Businesses can store, process, analyse, and exchange enormous…
Q: How does one go about translating blueprints into computer programs? To illustrate the steps…
A: Introduction to the field of architecture: The central thesis of the presentation is that the…
Q: A virtual private network (VPN) is the best option for protecting the perimeter of a network. Can…
A: A virtual private network (VPN) is the best option for protecting the perimeter of a network. Can…
Q: When a child process utilizes unnamed pipes to read the parent's message buffer, what happens…
A: A typical pipe is "unnamed" and only lasts as long as the creating process. On the other hand, a…
Q: It makes sense to discuss non-systems analytical approaches using structured language.
A: Given: Structured analysis uses data flow and entity connection models, process requirements, and…
Q: During these three decades, what developments in wireless security can you name? The two seem…
A: We meed to discuss the developments in wireless security during 3 decades.
Q: t is advisable to give the use of structured language considerable thought when describing processes…
A: Structured Analysis is a development method that uses diagrams to give analysts an analytical…
Q: ntrol Manager
A: Service Control Manager (SCM) is a special system process under the Windows NT group of working…
Q: There are various difficulties in creating an information system architecture to serve this new…
A: Definition: An information system architecture provides a formal definition of business or…
Q: explain the factors that can lead a designer to choose for a bottom-up approach to development…
A: Please find the answer below :
Q: ions, explain the various types of trees in discrete mathemat
A: the various tree is an given below :
Step by step
Solved in 4 steps with 2 images
- Java - Programming Develop a letter-guessing game in this assignment.Requirements:1). When the game begins, generate a random letter between A and Z;2). Display a message "I have a secret letter (A to Z), can you guess what it is?";3). Read the user's answer;4). Compare the user's answer and the random secret letter generated;5). If the user answer is before the random secret letter in the alphabet, display "Incorrect. Trysomething later in the alphabet" and go to Step 2;6). If the user answer is after the random secret letter in the alphabet, display "Incorrect. Trysomething earlier in the alphabet." and go to Step 2;7). If the user answer is the same as the random secret letter, display "Well done. Want to playagain (y/n)?";8). Read the user's answer. If the answer is 'y', go to Step 1. If the answer is 'n', go to Step 9;9). Display "Thanks for playing the game. Goodbye!". The program stops.Run your program several times. Take screenshots. Submit your Java file with the screenshotsWhat is the probability that in a classroom of x people, at least 2 will be born on the same day of the year (ignore leap year)? Use a Monte Carlo Simulation and a frequency table to write a program that calculates this probability, where the number of people (x) in the simulated class is given by the user. The probability for a class of size 23, should be right around 50%. NO language of "break" or "true" please! PLEASE USE THE OUTLINE GIVEN BELOW TO WRITE THE CODE: # What is the probability that in a classroom of x people, at least 2 will be born on the same day of the year (ignore leap year)?# I have given you the skeleton and some of the code... you complete it using a frequency table!# Note: In a classroom of only 23 people, the probability is about 50.7% !# Try first with 10000 trials and then try with 100000 trials. This code runs somewhat slowly in repl.it import mathimport random # create and initialize frequency table:ft = []k = 0while(k < 365) : ft.append(0) k = k+1…plz solve it asap ????????: Write a program for a game that consists of two players. The rule of the game is that player 1 inputs a random number from 1-100. Player 2 will input 5 numbers. If the summation of those numbers is equal to the number OR less than or greater than the number by 3 (+3 or -3), then player 2 wins. Otherwise, player 1 wins. Test Case 1 Input Player 1, enter a number: 50 Player 2, enter a number: 10 Player 2, enter a number: 10 Player 2, enter a number: 20 Player 2, enter a number: 5 Player 2, enter a number: 7 Output Player 2 wins Explanation: The summation of 10,10,20,5 and 7 is 52 which is greater than 50 by 2. According to the rule, player 2 wins. Test Case 2 Input Player 1, enter a number: 50 Player 2, enter a number: 10 Player 2, enter a number: 10 Player 2, enter a number: 20 Player 2, enter a number: 5 Player 2, enter a number: 1 Output Player 1 wins Explanation: The summation of 10,10,20,5 and 1 is 46 which is less than 50 and also doesn’t…
- What is the probability that in a classroom of x people, at least 2 will be born on the same day of the year (ignore leap year)? Use a Monte Carlo Simulation and a frequency table to write a program that calculates this probability, where the number of people (x) in the simulated class is given by the user. The probability for a class of size 23, should be right around 50%. NO language of "break" or "true" please! Please use the outline given below for the code:Let's modify the program from this section so that the user can supply the interest rate. For very small interest rates, it may take a very long time for the balance to double. Assume the user can't wait for more than twenty years. Stop adding interest when the balance has doubled or twenty years have elapsed. 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 finaldoubleTARGET=2*INITIAL_BALANCE; doublebalance=INITIAL_BALANCE; intyear=0; Scannerin=newScanner(System.in); System.out.print("Interest rate in percent: "); doublerate=in.nextDouble(); // TODO: Count the years required for the investment to double // but no more than 20 years /* Your code goes here */ System.out.println("Year: "+year); System.out.printf("Balance: %.2f%n", balance); }A retail company assigns a $5000 store bonus if monthly sales are more than $100,000; otherwise a $500 store bonus is awarded. Additionally, they are doing away with the previous day off program and now using a percent of sales increase to determine if employees get individual bonuses. If sales increased by at least 4% then all employees get a $50 bonus. If they do not, then individual bonuses are 0. The first module in the program is getSales(). Since this is still required, leave this module as is. This module should be written as follows: //MODULE 1 //this module takes in the required user input Module getSales(Real Ref monthlySales) Display “Enter the total sales for the month.” Input monthlySales End Module Step 3: The second module in the program was isBonus(). Since there are two types of bonuses now, rename this module and the module call to storeBonus(). Write an if then else statement within this module that will set the bonus amount to either 5000 or…
- For this assignment, write a program named PizzaPrices that prompts the user to make a choice for a pizza size - S,M, L, or X - and the number of pizza the user wants to order. The price for different size pizzas are $6.99, $8.99, $12.5, and $15.0 respectively. There is also a discount based on the number of pizza ordered: no discount for one pizza, 10% discount for 2 pizzas, 15% discount for 3-5 pizzas, and 20% for more than 5 pizzas. Display a full accounting of the transaction, similar to the sample screenshot. Please make sure you use parallel arrays and range match in your solution.This is basically something that has a certain number of states (sort of like how a traffic light can be Red, Yellow, Green) and changes from one state to another.This program will have 4 states: HAPPY, HUNGRY, BORED, SAD. Here are the rules. Our animal starts in a state of Happy, with the values for hungry = 0 and bored = 0. Each round the player can "feed", "play" or "ignore" their animal. If they feed their animal, then the hungry meter goes down and bored meter goes up. If they play with their animal, then the bored meter goes down and the hungry meter goes up. If they ignore their animal, then both hungry and bored go up. Don't go below 0 Here are the state changes. Each one of these is a "case" in a switch (from current state -> new State):HAPPY If hungry >= 2 transition to HUNGRY If bored >= 2 transition to BORED HUNGRY if hungry >= 4 transition to SAD if bored > hungry transition to BORED if hungry < 2 transition to HAPPY BORED If bored >= 4…Write a program to calculate total ordering cost. Jacob is a retailer for ice. Normally a bag of ice costs $2.5, but the price varies with the amount that he purchases. The following table shows the discount that Jacob receives. Order Volume Discount Rate >= 200 bags 25% off 120 - 199 bags 20% off 60 - 119 bags 15% off 40 -59 bags 10% off 20 – 39 bags 5.5% off 0-19 bags No discount (1) Inyourprogram,definevariableswithmeaningfulnamestoacceptuserinputonordervolume, and calculate total ordering cost based on the order volume inputted. Use if-else statements to handle the calculations for different order volumes as shown in the above table. (2) Yourprogramshouldprintoutuserordervolume,discountrate,andtotalorderingcostinconsole (similar to the following sample outputs)
- Write a program that will figure out the required change for a purchase. Start by asking the user for the price of the product and the amount paid. (We are expecting that the user will give a larger value for the amount paid.) Read in each of these values as a double. Report back to the user the number of each denomination of change due. You are not just telling the user the amount of money he gets back. Hint: Working with integers is much easier. The modulo operator is your friend for this assignment. Also, note that pennies can be tricky due to the poor real number to binary conversions. (Remember that 1.00 could actually be stored as 0.9999999999997.) Do not include five-dollar bills, ten-dollar bills, etc. Only show coins and one-dollar bill amounts. Be sure to test multiple values. There is a test case below. Your program should run the test case exactly as it appears below, and should work on any other case in general. Output Example (User input is marked with >>>.…Exercise 3.9Modify program P34_1.cpp to compute the side area, total area, and volume of a cylinder and thearea and volume of a sphere, depending on the choice that the user makes. Your program shouldask users to enter 1 to choose cylinder or 2 for sphere, and display an "invalid choice error" forother values.For a cylinder, we want to compute:Side area: (2*PI*r) * hTotal Area: 2*(PI*r2) + Side areaVolume: (PI*r2)*hFor a sphere, we want to compute:Surface area: 4*PI*r2Volume: (4.0/3.0)*PI*r3.Use overloading whenever possible.Call your new program Ex39.cpp.Python programming In a department store sale, customers who purchase over 2000 are given 10% discount. Write a program that will accept for the purchase amount of a customer, solve for his/her discount if there’s any, ask for the money he/she is going to pay, then output the discounted price and the change of the customer.”