A. First and Last Design a program that asks the user for a series of names (in no particular order). After the final person's name has been entered, the program should display the name that is first alphabetically and the name that is last alphabetically. For example, if the user enters the names Kristin, Joel, Adam, Beth, Zeb, and Chris, the program would display Adam and Zeb.
Q: C++ Demonstration #1; The manager of a football stadium wants you to Write a program that…
A: - We need to write a program for the total tickets sold and the total amount.
Q: 4. Area of a Rectangle • Write a program that compares the area of two rectangles. You can do this…
A: len_rect1 = float(input("Enter the length of first rectangle: ")) # taking the length of rect1…
Q: Draw hierarchy charts or flowcharts that depict the programs. Design a hierarchy chart or flowchart…
A: Hierarchy charts or flowchart of given problem:-
Q: C++ Language Write a single cout statement that prints exactly the following on the screen while…
A: Needed: Write a single cout statement that prints exactly the following on the screen while there…
Q: 7. Test Average and Grade Write a program that asks the user to enter five test scores. The program…
A: /*Java Program that ask user to enter 5 test scores and displays letter grade for each score and…
Q: Body Mass BMI) IS offen Used to defermin mether person lifestyle is overweight or underweight for…
A: #include <stdio.h>#include <math.h>int main(){float wt,ht,bmi;int ch;printf("bmi…
Q: Reham's little brother has a geographical compass which has 'S', 'N', 'W' and 'E' marked on it. Her…
A: Step 1: Prompt and accept the alphabet. Step 2: Use if-else if-else construct to compare the…
Q: - Age - Thename of the City - Thename of the College - Aprofession - Atype of an animal - Apet's…
A: C++ used to answer this question
Q: urbo c++ code for The utilities commission has decided that the electric company overcharged its…
A: Include necessary header file. In main function declare a integer variable kilowatt and float…
Q: ( MindTap - Cenage )Example 5-6 implements the Number Guessing Game program. If the guessed number…
A: The given program in C++ performs the below tasks: Generates a random number between 0 to 100 and…
Q: C++ Demonstration #1: Create a program segment that will ask for a grade from the user and display…
A: - We need to create a grade program in C++ with certain constraints.
Q: Design a program that asks the user for a series of names (in no particular order). After the final…
A: Sentinel controlled while loop : The sentinel is a flag value that can be numerical or boolean or…
Q: "### Exercise 1 ###\n", "\n", "The table presented below gives a final grade based on the amount of…
A: Input number of points received from the user. Check if points less than 500, then set grade as 0.…
Q: The utilities commission has decided that the electric company overcharged its customer for 2 months…
A: Program code: #include <stdio.h>int main(){ //declaring variables float…
Q: "### Exercise 1 ###\n", "\n", "The table presented below gives a final grade based on the amount of…
A: Algorithm: Algorithm for given problem is: Start print("Enter total points at end of the course:")…
Q: Part F: Honors Diploma Students Qualify for the Honors Diploma if their GPA is 3.6 or higher, OR…
A: Code in python is attached as well as a screenshot.
Q: conditional structures Create a program that will determine if a number is divisible by 3 or 4
A: #include <iostream>using namespace std; int main(){ int num; cout<<"Enter a…
Q: Design a program that asks the user for a series of names (in no particular order). After the final…
A: Program Plan: Create an empty list to store the names. Start the loop till 1 is pressed. Input name…
Q: **3.23 (Geometry: point in a rectangle?) Write a program that prompts the user to enter a point (x,…
A: C++ Program for above : #include <iostream> using namespace std; int main() { int…
Q: Payroll Program with Input Validation Design a payroll program that prompts the user to enter an…
A: hourly_pay_rate = float(input("Enter employee's hourly pay rate (in $): ")) # taking user input…
Q: *4.17 (Game: scissor, rock, paper) Write a program that plays the popular scissor-rock- paper game.…
A: The pogram is given below:-
Q: The Fibonacci series is a series that begins with 0 and 1 and has the property that each succeeding…
A: PROGRAM CODE: #include <iostream> // include header file for input output stream…
Q: Additional Problem: Write a program that displays the first and last words of a sentence input by…
A: I write the program in java, here the program takes a sentence and prints the first and the last…
Q: Program 4) Body Mass Index (BMI) is a measure of health based on weight. It can be calculated by…
A: As the language is not specified answer written in c++
Q: Singular to Plural. Create a program that accepts a word in singular, and produces the corresponding…
A: Note : Answering in python as no language is mentioned. Input : Input the word in singular. Output…
Q: Add Number Series Programming challenge description: Write a program that, given an integer, sums…
A: #accept a number num = int(input("Enter The Number: ")) Sum = 0 Minus = 0 #loop through the number…
Q: 12: guess.cpp) Write a program that plays a guessing game with the user. The user should pick a…
A: Code : #include <iostream> using namespace std; int main() { /* Welcome the user and…
Q: Activities at Lake LazyDays As activity directory at Lake LazyDays Resort, it is your job to suggest…
A: ANSWER:-
Q: C++ Demonstration #3: Create a program that will arrange the values c A, B and C in ascending order…
A: #include <iostream>using namespace std; int main(){ //Sort three numbers. int A =…
Q: The Game of Nim Problem Description: Two players alternately take marbles from a pile. In each move,…
A: Program Requirements as per question: The program must define and use the following methods, int…
Q: Theater Seating Revenue with Input Validation A dramatic theater has three seating sections, and it…
A: start input number of ticket sold in A , B and C then validate calculate amount get from each…
Q: 4. Calculate employee's pay A program is required by a company to read an employee's number, pay…
A: We need to write a code to perform given functions.
Q: - First and Last Design a program that asks the user for a series of names (in no particular order).…
A: Python code to print the first and last name from user input names is given below.
Q: Customized step counter Learning Objectives In this lab, you will Create a function to match the…
A: here we are calculating the miles walked based on the number of steps given and the stretch of each…
Q: Evaluation (Factorial of a Number) Write a program that calculates the tactorial of a number using…
A:
Q: 2. Classify Numbers The main parts of the program are:: initialize the variables, read and classify…
A: C++ program
Q: c++ program create a program that will ask the user to accept the total tuition fee of the student.…
A: - We need to code the tution fee calculation in C++.
Q: C-Program for blood pressure. The program (screenshot below) compares the systolic & diastolic…
A: //BloodPressure.h#ifndef BLOODPRESSURE_H#define BLOODPRESSURE_H#include <string>using…
Q: Financial application: compute future apartment rent) Suppose that the rent for an apartment is…
A: The problem is based on finding the rent of the apartment using programming. NOTE: The code is…
Q: Sales Prediction The East Coast sales division of a company generates 58 percent of total sales.…
A: Hey there, I am authorised to answer any one question at a time when there are multiple questions…
Q: 1. Write a pyrhon program that prints out a classic hangman stick figure. The program should ask the…
A: Answer :
Q: Question 7
A: Following is the C++ program and its approach is given below: Declare necessary header files.…
Q: Python Programming TasksQuestion 3Businesses some time market their contact no as: 111-GET-SONY.…
A: PROGRAM CODE: format = {}…
Q: LAB ASSIGNMENTS, CONT. avg rainfall.py: Write a program that collects rainfall data and calculates…
A: Answer: Python Source Code: total_sum = 0years = int(input("How many years are in your rainfall…
Q: Day of the Week Calculator For this assignment you will write a program that will allow you to enter…
A: To find the day of a given number in Java, the date is given as input, we will use Calendar class,…
Q: Example-6 A number of rivers (N), each river has three (pH) values. Write a program to read the (pH)…
A: The ask is to write a program doing the following: - Take user input for number of rivers - For each…
Q: (Geometry: area of a pentagon) Write a program that prompts the user to enter the length from the…
A: Note: Due to company policies I am compelled to solve only one question and that is the first…
Q: C Program / C Language Make a C program. The date is january 1, 2019. Cody has a lot of neighbors…
A: Here, I have to write a C code to the above question.
Q: This pseudocode is intended to display // employee net pay values. All employees have a standard //…
A: Program plan: Declare the variable name Define the variable EOFNAME as "ZZZZ" Define DEDUCTION as…
Q: First and Last Design a program that asks the user for a series of names (in no particular order).…
A: The, code has given below:
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
The
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }Singular to Plural. Create a program that accepts a word in singular, and produces the corresponding plural. Use the following rules: a. If the word end in ‑s, -ss, -sh, -ch, -x, or –z, then add –es to the word. For example, the plural of tax is taxes b. If the word ends in -fe, then replace the ending with –ves. For example, the plural of wolf is wolves c. If the word ends in y and the previous letter is a vowel, then add –s to the word. For example, the plural of boy is boys d. If the word ends in y and the previous letter is a consonant, then change the –y ending with –ies. For example, the plural of city is cities e. If the word does not meet the criteria above, then add –s to it.Coin Converter Lab Description Write a program that asks the user to enter an amount of money in the format of dollars and remaining cents. The program should calculate and print the minimum number of coins (quarters, dimes, nickels and pennies) that are equivalent to the given amount.Hint: In order to find the minimum number of coins, first find the maximum number of quarters that fit in the given amount of money, then find the maximum number of dimes that fit in the remaining amount, and so on. File Name coins.py Score There are five tests each worth 2 points For example, an execution should look like this:Please enter the amount of money to convert:# of dollars: 2# of cents: 37The coins are 9 quarters, 1 dimes, 0 nickels and 2 pennies python labs
- Q1. Write a program that takes your full name as input and displays the abbreviations of the firstand middle names except the last name which is displayed as it is. For example, if your name isRobert Brett Roser, then the output should be R.B.Roser.French Articles: French country names are feminine when they end with the letter e, masculine otherwise, except for the following which are masculine even though they end with e: le Belize le Cambodge le Mexique le Mozambique le Zaïre le Zimbabwe Write a program that reads the French name of a country and adds the article: le for masculine or la for feminine, such as le Canada or la Belgique. However, if the country name starts with a vowel, use l’; for example, l’Afghanistan. For the following plural country names, use les: les Etats-Unis les Pays-BasSingular to Plural. Create a program in Python that accepts a word in singular, and produces the corresponding plural. Use the following rules: a. If the word end in ‑s, -ss, -sh, -ch, -x, or –z, then add –es to the word. For example, the plural of tax is taxes b. If the word ends in -fe, then replace the ending with –ves. For example, the plural of wolf is wolves c. If the word ends in y and the previous letter is a vowel, then add –s to the word. For example, the plural of boy is boys d. If the word ends in y and the previous letter is a consonant, then change the –y ending with –ies. For example, the plural of city is cities e. If the word does not meet the criteria above, then add –s to it.
- (Apartment problem) A real estate office handles , say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program that prompts the user to enter: The total number of units. The rent to occupy all the units. The increase in rent that results in a vacant unit. Amount to maintain rented unit. The program then outputs the number of units to be rented to maximize the profit.Computer Fundamentals and Programming 2 Write a program that determines a student’s grade. The program will accept 3 scores and computes the average score. Determine the grade based on the following rules: - If the average score is equal or greater than 90, the grade is A. - If the average score is greater than or equal to 70 and less than 90, the grade is B. - If the average score is greater than or equal to 50 and less than 70, the grade is C. - If the average score is less than 50, the grade is F. Source Codes and Print Screen of the OutputProblem: Feed Nibble Monster Till Full Write a program that generates a number in [0, 500] at the beginning -- this corresponds to how hungry the monster is -- and keeps asking the user to feed the monster until that number falls to zero. Each time the user feeds the monster a nibble, hunger decreases by the decimal value of the character (i.e. if the user feeds 'A' hunger decreases by 65). But when the user feeds the monster some character that isn't a nibble, the hunger increases by the decimal value of the character (since puking depletes energy). Use while loop. Sample runs: Notice the loop exits after one iteration, because hunger was very low and one nibble made the monster full: Notice hunger increasing after non-nibble (pink highlight): Notice that the program just keeps going when the user feeds the monster only non-nibbles. Do you think the program will keep running forever if the user never gives the monster nibbles?
- Crispies Bagels and Bites wants a program that allows its salesclerks to enter the number of bagels, donuts, and cups of coffee a customer orders. Bagels are 99 cents, donuts are 75 cents, and coffee is $1.20 per cup. The program should calculate and display the total price of the customer’s order. First, create an IPO chart for this problem, and then desk-check the algorithm twice. For the first desk-check, use 0, 12, and 2 as the number of bagels, donuts, and cups of coffee, respectively. For the second desk-check, use 2, 6, and 1.C-Program for blood pressure. The program (screenshot below) compares the systolic & diastolic measurements to output whether the blood is (low, ideal, pre-high, or high) The code I wrote is able to successfully determine the blood pressure type as long as it lies within the same range. However, if it goes outside that range it prints an error. FOR EXAMPLE**** PLEASE READ*** If the user inputs their systolic variable as 100 and their systolic as 90, it will print an error. If the systolic & diastolic measurements are vastly different the program prints an error, if you could help resolve this issue it would be greatly appreciated.1. Write a pyrhon program that prints out a classic hangman stick figure. The program should ask the user to enter a number from 1-6 and the corresponding hangman should be printed. The value the user inputs corresponds to the number of incorrect guesses in a real hangman game and so the completeness of the hangman will correspond to the number of ‘incorrect guesses’ inputted by the user (e.g., if the user enters 1, then only the head of the hangman will be printed; full example below). Example:Enter a number from 1-6: 1O Enter a number from 1-6: 2O|Enter a number from 1-6: 3O\||Enter a number from 1-6: 4O\|/|Enter a number from 1-6: 5O\|/|/Enter a number from 1-6: 6O\|/|/ \ 2. Modify your program from problem 1 so that the user input is checked to be a validsingle digit (1-6) before printing the corresponding hangman. If the input is not valid, theninstead of a hangman the following message should be printed “Invalid input: you must enter asingle number from 1-6.” Example:Enter a…