Concept explainers
(You should do the previous two
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
Absolute C++
Additional Engineering Textbook Solutions
Mechanics of Materials (10th Edition)
Modern Database Management
Degarmo's Materials And Processes In Manufacturing
Java: An Introduction to Problem Solving and Programming (8th Edition)
SURVEY OF OPERATING SYSTEMS
Management Information Systems: Managing The Digital Firm (16th Edition)
- Program 2: Write a program that asks the user for a word or phrase. Check to see if it is a palindrome. A palindrome is a word that is spelled exactly the same forward and backwards such as radar or noon. Your program must also take case into account. If the user types Radar, it must still return that it is a palindrome. Do not worry about palindromes with spaces. You do not need to put any code in static methods, you do not need to worry about try/catch blocks, and you do not need to make the program run more than once. Test values that I will use in class: Noon palindrome tacocat palindrome Hello not a palindrome in javaarrow_forwardPlease write a program which estimates a user's typical food expenditure. The program asks the user how many times a week they eat at the student cafeteria. Then it asks for the price of a typical student lunch, and for money spent on groceries during the week. Based on this information the program calculates the user's typical food expenditure both weekly and daily. The program should function as follows: How many times a week do you eat at the student cafeteria? 4 The price of a typical student lunch? 2.5 How much money do you spend on groceries in a week? 28.5 Average food expenditure: Daily: 5.5 euros Weekly: 38.5 euros Sample outputarrow_forwardPlease use Visual Studios coding in Python. (Use Python 3 Version)arrow_forward
- Part 4: For circle, square and annulus write a program to find the area, perimeter (or circumference) for a range of parametric values given by the user and plot the corresponding shapes in the range given. User needs to identify lower and upper values of each parameter. The identified range for the parameters should be then divided into 10 monotonic steps inside your program. Accordingly, you need to calculate the values and plot the shapes corresponding to all 10 values in the range identified by the user. The program should plot the geometries in the first quadrant.arrow_forwardExercise 4: Write a program that reads two pieces of information: the hourly wages and the number of hours worked by the employee. The program should then calculate the net salary of the employee and display the results as shown in Figure 4. Note that: the net salary of the employee is the sum of the basic wages (which is number of hours worked times the hourly wages) minus the Social Security fees; where the Social Security fees represent 10% of the Basic wages. Name your program Lab3_Id_ex4.py, where Id is your university Id. Include the design of your solution as comments at the beginning of your program. Test your solution with different input data. Please enter the employee hourly wages? 10 please enter the number of hours worked? 40 Basic Salary Hourly Wages Number of Social Net Salary Hours Security **** 10.000 40.00 400.000 40.000 360.000 **** Figure 4: Exercise 4 Sample Runarrow_forwardNeed python help running code and others. Functions are ideal for use in menu-driven programs. When the user selects an item from a menu, the program can call the appropriate function. Write a menu-driven program for Burgers. Display the food menu to a user (Just show the 5 options' names and prices - No need to show the details!) Use numbers for the options and the number "6" to exit. If the user enters "6", your code should not ask any other questions, just show a message like "Thank you, hope to see you again!" Ask the user what he/she wants and how many of them. (Check the user inputs) Keep asking the user until he/she chooses the exit option. Use a data structure to save the quantities of the orders. You should use ArrayLists/Array Bags, or LinkedLists/LinkedBags (one or more of them) to save data. Calculate the price. Ask the user whether he/she is a student or a staff. There is no tax for students and a 9% tax for staff. Add the tax price to the total price.…arrow_forward
- I need helparrow_forwardWrite a main function that performs the following: • Prompts user to enter 2 integer values A and B. • if the first number A is greater than to B+5, the main function prints out the result of 6 multiplied with the every odd number from 1 to B... • If the first number A is less than or equal to B+5, the main function prompts the user A times to enter grades in a variable called grade and print their summation. • If not, it prints out "No output to be given".arrow_forwardTask 1: Get an integer type input from the user and compare it with a number “10”. If an input is greater than 10, print “The input number is greater than the provided number”. (write the program in C++ language)arrow_forward
- using c++ Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient, the following data should be entered: The number of days spent in the hospital The daily rate Hospital medication charges Charges for hospital services (lab test, etc.) The program should ask for the following data if the patient was an out-patient: Charges for the hospital services (lab test, etc.) Hospital medication charges The program should use two functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out-patient information. Both functions should return the total charges.arrow_forward-Write a program that asks the user to enter a person's age. The Problem 2: Age Classifier program should display a message indicating whether the person is an infant, a child, a teenager, or an adult. These are the guidelines: If the person is 1 year 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.arrow_forward1. Write a program that prompts the user to enter an integer between 0 and 6 and prints thie day name of the week (Sunday is 0, Monday is 1,..., and Saturday is 6). 2. Write a program that prompts the user to enter an integer and tests if it is divisible by 5 and 3, or if its divisible by 5 or 3 or if its divisible by 5 or 3 but not both.arrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr