Write an algorithm (in pseudocode) for the following Scenario. You will need to build a program that provides retirement estimates based on user inputs. Your algorithm will ask the user to provide the following information: • Full Name • Current Age Desired Retirement Age Current Retirement Savings • Amount You Need to Retire The program will need to determine the years remaining until retirement and how much is needed to reach the investment goal. Finally, it will print a message to the screen that says: • The name, How long until you reach retirement age and • How much is needed to be saved between now and then This is not to be written in any programming language--it must be written in pseudocode. For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). T T T T Formatted C v Arial v 3 (12pt) E ES T T, O f Mashups HO I HTHL CSS
Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…
A: you are increasing value of i two times. There is problem. Make sure save your file after writing…
Q: t has been said that a monkey pushing keys at random on a typewriter could produce the works of…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: An algorithm is approximately the same thing as a recipe, but some kinds of steps that would be…
A: Add vanilla extract to taste suggests to add some extra content to get the taste Beat until…
Q: Write a java program that allows the user to enter his name and his year of birth, the program…
A: Start Take the input of the age. Compute the age. Print the age with years, month, days Print the…
Q: Write a program that plays a guessing game with the user. The user should pick a letter, and the…
A: GIVEN: Write a program that plays a guessing game with the user. The user should pick a letter, and…
Q: The population is modeled by P(t)= 19 72 73 000/ 1+ e^-0.03134(t-1913.25) t = date in years. Write a…
A: According to the information given:- We have to write program to display the population every ten…
Q: Write a graphical program to trace a random walk (see previous two prob-lems) in two dimensions. In…
A: EXPLANATION Below is the answer for the given question. Hope you understand it well. If you have any…
Q: Write a program that simulates rolling a pair of dice. The program should output the value of each…
A: Solution: Note : Program is written in java as you didn't mention any programming language.…
Q: ABC Bank announced a new scheme of reward points for a transaction using an ATM card.Each…
A: Code: import java.util.*;public class Demo{ public static void main(String args[]) { Scanner…
Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…
A: Program algorithm- STARTStep 1: Import the essential headers.Step 2: Define the main function.Step…
Q: Programming Exercise Numeric Triangle Pattern Based on the example given on the previous module,…
A: Below is the complete solution with explanation in detail for the given question in Python…
Q: Write a pseudocode for the scenario below Congrats! You work for Zillow now. Your first task is to…
A: Code for it in c++ is- #include <iostream>using namespace std; int main(){ int…
Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…
A: read number_of_flips pass it to function. set i=0 while i<number_of_flips:…
Q: Write a program that simulates the rolling of two dice. The program should use rand to roll the…
A:
Q: Write a program that plays a number guessing game with a Human user. The Human user will think of a…
A: // do comment if any problem arises //code #include <iostream> using namespace std; //this…
Q: Write pseudocode to describe an average mark calculator program that computes the average mark for a…
A: What is Pseudocode: It is a simple version of programming code written in english before it is…
Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…
A: pass number of flips to function call heads_or_tails() iterate from i=0 to i<n call…
Q: Give the pseudo code for an algorithm of a software solution to the problem down below. You must use…
A: Here is the pseudo code of the above scenario in Python:
Q: ored) a.Assume that the restaurant manager has hired 30 employees and each employee must be working…
A: You are required to use a Genetic Algorithm and a Python programming language for this project.A…
Q: Imagine two teams are playing football and the scores are tied after 120 minutes of play. Now the…
A: Code: teamA=0teamB=0p=0for i in range(1,6): if(teamA==3 and teamB==0): print("Team 1 wins…
Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…
A: code : import random def heads_or_tails(): # call randint() to to select a number between 0…
Q: Java code for this: In a triangle, the sum of the 1st and 2nd side must always be greater than the…
A: start input three side call check validity function that checks whether three sides forms triangle…
Q: Write a Java program to generate a user's daily average number of walking steps for a given month of…
A: In this question, we are asked to write a java program which calculate the average of walking…
Q: The following question uses a robot in a grid of squares. The robot is represented by a triangle,…
A: A 5*5 grid is given along with the position of the robot. We need to make robot move in such a way…
Q: Print the words in alphabetical order.
A: The program is written in HTML and Javascript. Please check the source code and output in the…
Q: a program that repeatedly asks the user whether they wish to calculate another square root. If the…
A: Program: import java.util.Scanner; public class Main{ public static double sqrt(double n) {…
Q: Write a Java program for Zeller’s Algorithm, which can be used to determine the day of the week for…
A: A required program is as follows, import java.util.Scanner; public class Main { public static…
Q: Write a program to solve the problem of Tower of Hanoi. User would input the number of plates they…
A: Given: Write a program to solve the problem of Tower of Hanoi. User would input the number of…
Q: write in JAVA LANGUAGE Create a program that will compute PRELIM, MID-TERM, PRE-FINAL, FINALS GRADES…
A: Task : Collect the 3 quiz marks in Prelim Midterm Pre-Finals Finals Output the list of grades…
Q: Write a python program that lets the user play the game of Rock, Paper, Scissors against the…
A: #Rock, Paper, Scissors Game import random while True: choice=int(input("Enter your choice 1.Rock,…
Q: Write a program that helps a person decide whether to buy a hybrid car. Your program's inputs should…
A: PSEUDO CODE: DECLARE: float carPrice,miles,MPG,gasPrice,resale; double…
Q: Change the program above to add the numbers 157 and 13. (Hint: these numbers are constants and…
A: Mail box Mnemonic code Numeric code Instruction 00 IN 901 ;input 1st number 01 STO 99 399…
Q: A python program that lets the user play the game of Rock, Paper, Scissors against the computer. The…
A: import random random.seed(300) def determineWinner(playerChoice, computerChoice): # Checking…
Q: Create the algorithm for the following problem: A company is giving out bonus to the employees…
A: Here we bonus rate is given by bonus rate = numofYears /100 Now here first we need to accept number…
Q: .In a scheduling program, we want to check whether two appointments overlap. For simplicity,…
A: Flow chart is the pictorial representation of the flow of a program
Q: Programming Exercise Numeric Triangle Pattern Based on the example given on the previous module,…
A: C++ CODE:- #include <iostream>using namespace std;void pattern(int n){ for (int i = 0; i…
Q: Write a program that simulates the rolling of two dice. The program should use rand twice to roll…
A: Answer : Please find the code below::: #include <stdio.h> #include <stdlib.h> int main()…
Q: Write a C++ program to simulate the tasks of a vending machine. The machine accepts only coins from…
A: C++ code :- #include<iostream>#include <stdlib.h>#include <string.h>#include…
Q: Write a fully documented Java program that asks the user to enter a list of exam scores given as…
A: ALGORITHM:- 1. Take input for marks from the user. 2. Continue taking marks until -1 is entered. 3.…
Q: Write an algorithm for this car to choose from two possible road trips. You will calculate the…
A: An algorithm is a finite set of steps used to solve a specific problem. It is a step by step…
Q: Write a program that lets the user play the game of Rock, Paper, Scissors against the com- puter.…
A: import java.util.Random;import java.util.Scanner; public class Main { public static int…
Q: Write a program that simulates the rolling of two dice. The program should use rand twice to roll…
A: Here, I write C program for the above question.
Q: It has been said that a monkey pushing keys a random on a typewriter could produce the works of…
A: As no programming language is mentioned, so I am using C++ to answer it. In step 2, you will get C++…
Q: Consider a vending machine that offers the following options: [1] Get gum [2] Get chocolate [3]…
A: Objective: An application should be built considering the functionalities of a vending machine. It…
Q: Write a java program. Drinks such as Coffee, Tea, Cola and energy drinks contain caffeine level.…
A: Algorithm: Start Read no.of green tea cups consumed Calculate result=28*no.of green tea cups…
Q: a program that implements the algorithm that you designed in Exercise 34 of this chapter (Chapter…
A: As no programming language is mentioned it is solved using basic C++
Q: Write the pseudocode for the following scenario: A manager at a 2nd hand car dealership wants to…
A: As Pseudocode is basically blueprint of Algorithm. It is not a complete code. It is usually steps…
Q: Write a python program for a pig game that has two players that alternate turns rolling dice. In…
A:
Q: Write a pricing algorithm for item A and the amount you bought. The algorithm shows the cost,…
A: 1) Read the item A price from the user 2)Read the amount brought from the user
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Scenario: A robot is sitting in a chair with its arms facing down. Write an algorithm, using pseudocode, to make the robot: stand up walk until it senses a wall turn around walk back to the chair sit back down in the origin starting position Finally, output the total number of steps taken. Commands: In addition to our standard pseudocode commands, you must also use the following robot control commands: sit stand step (one step forward) raise arms (parallel to floor) lower arms (pointing to floor) sense (only if arms are raised) turn (90 degrees right) Immediately after issuing a sense command, you can check if the robot is at a wall.You do this via the boolean conditions "at wall" or "not at wall".The following are examples of this: if at wallif not at wallwhile not at wall AssumptionsYou must assume the following facts: The robot's initial sitting position is directly facing the target wall. There are no obstacles between the robot and the wall. The wall is 1 or more exact steps…Write a pseudocode for the scenario below Congrats! You work for Zillow now. Your first task is to write an algorithm that recommends apartments based on a user’s preferences. Zillow offers the following three properties for rent: Apartment A – 600 square feet, pets allowed, $1400/month Apartment B – 800 square feet, no pets, $1600/month Apartment C – 1000 square feet, pets allowed, $1800/month Write an algorithm for a program that does the following: Prompt the user for the minimum square footage they will accept, how many pets they have, and the maximum price they’d pay per month, and then calculate and output the apartments that match their preferences. If there is no apartment that matches their preferences, print out "No matches, sorry!". Make sure the inputs are valid--negative square footages, prices, and pet numbers don’t make sense! --- Sample run ---: What is the minimum square footage you’d like? 800 How many pets do you have? 1 What is the maximum monthly rent you’d pay?…Write the algorithm and its equivalent Python program to score the “paper-rock-scissor” game. Each of two users type in ‘P’, ‘R’ or ‘S’, and the program announces the winner as well as the basis for determining the winner: “paper covers rock”, “rock breaks scissors”, ”scissor cuts paper”, or “nobody wins”. Be sure to allow the users to use lower as well as uppercase letters.
- 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%. I have an outline for the code but please only use python language and NO "break", "true" language import mathimport random # create and initialize frequency table:ft = []k = 0while(k < 365) : ft.append(0) k = k+1 # Allow the user to determine class size:print("Please type in how many people are in the class: ")x= int(input()) success = 0 # Simulate:c = 0while(c < 10000) : # Step 1: re-initialize the birthday frequency table (it must be re-initialized for each play-through (why?): k = 0 while(k < 365) : ft[k] = 0 k = k+1 # Step 2: randomly get x birthdays and update frequency table: k =…code Java For this activity, create a baseball score-keeping program: The number of innings (rounds) should be set by a constant Each inning, collect the score for the home team and visiting team and add it to the team's total Print the updated scores and the current inning at the end of each inning If the scores are tied at the end of the game, go to "extra innings" until a team has the lead Announce the winner of the game at the endIn a scheduling program, we want to check whether two appointments overlap. For simplicity, appointments start at a full hour, and we use military time (with hours 0–24). The following pseudocode describes an algorithm that determines whether the appointment with start time start1 and end time end1 overlaps with the appointment with start time start2 and end time end2.If start1 > start2s = start1Elses = start2If end1 < end2e = endl Elsee = end2 If s < eThe appointments overlap.Else The appointments don’t overlap.Trace this algorithm with an appointment from 10–12 and one from 11–13, then with an appointment from 10–11 and one from 12–13.
- 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 >>>.…Write a code in Java Programming Your task is to simulate a coffee shop using the observer pattern (do not use the deprecate one). The coffee shop serves two types of coffee: espresso and cappuccino. The shop has two baristas, EspressoBarista and CappuccinoBarista. EspressoBarista generates random espresso orders between 1 and 3 every 2 seconds, while CappuccinoBarista generates random cappuccino orders between 1 and 3 every 3 seconds. The UML design diagram is shown below. Property ChangeListenerfac Observablenerfacto Coffeeshop HashMap Sting, integer> ingredients ExpresssCartate The CoffeeShop class holds the current stock of ingredients and the CoffeeShop constructor initializes the count for each ingredient. The required ingredients for each type of coffee are as follows: • Espresso: 1 shot of espresso, 1 ounce of milk Cappuccino: 1 shot of espresso, 2 ounces of milk, 1 ounce of foam If an order cannot be fulfilled because there are not enough ingredients, a warning message…Write and implement an algorithm that gets the amount of electricity used in kilowatt-hours and the cost of electricity per kilowatt-hour. Its output is the total amount of the electric bill, including an 8% sales tax. Write your answer to the following as multiple line comments at the beginning of your program.1. What are the data requirements of your program?2. Outline your algorithm using a pseudocode.
- Write an algorithm that asks the user to enter 10 test scores and do the following:(a) Print out the highest and lowest scores.(b) Print out the average of the scores.(c) Print out the second largest score.(d) If any of the scores is greater than 100, then after all the scores have been entered, print a message warning the user that a value over 100 has been entered.(e) Drop the two lowest scores and print out the average of the rest of them.Suppose that the first number of a sequence is x, where x is an integer. Define a0= x; an+1=an/2 if an is even; an+1= 3*an +1 if an is odd. Then there exists an integer K such that ak=1. Write a Program that prompts the user to input the value of x. The program outputs the integer K such that ak=1 and the numbers a0, a1, a2,……….., ak.. (For example, if x=75, then K=14, and the numbers a0, a1, a2,……….., a14, respectively, are 75,226,113,340,170,85,256,128,64,32,16,8,4,2,1. ) Enhance your program from part a by outputting the position of the largest number and the largest number of the sequence a0, a1, a2,……….., ak.. (For example, the largest number of the sequence 75,226,113,340,170,85,256,128,64,32,16,8,4,2,1 is 340 and its position is 4. )In Python, Write a program that continuously asks for a non-negative score until the user enters -1. IF the user enters a valid score ask for the possible score for that assignment, we will not assume all scores will have the same maximum value. We will assume that no one will receive a score of 0 on any assignment IF anything it is actually turned in, meaning a score of 0 indicates that the score was not turned it. It’s still the score for the assignment, but this fact will be used later in the assignment. Once all of the scores have been entered display the following information: • Total number of scores entered. • Total points for the student. • Total number of possible points • Class percentage, with 2 decimal place. • Letter grade using the 90, 80, 70, 60 grading scale. • If we believe the student has dropped. We will assume this is true if ALL of the entered scores are 0 (indicating that nothing was turned it). • If all of the scores were turned in or if the student is missing at…