The recipe produces 48 cookies with these amounts of the ingredients. Write a program that asks the user how many cookies he or she wants to make, and then displays the number of cups of each ingredient needed for the specified number of cookies.
Q: (Python) Please write a program that creates steps. You are expected to take in a single positive…
A: Required: Please write a program that creates steps. You are expected to take in a single positive…
Q: Exercise 2 Write a program that asks the user to enter their student ID and course code (like…
A: Python code for given question is given below.
Q: Body Mass Index (BMI) is a measure ofhealth on weight. It can be calculated by taking your weight in…
A: Program code: //import the required packages import java.util.Scanner; //define a class BMI public…
Q: 3. write a program that calculates and prints the monthly paycheck for an employee. The net pay is…
A: Note: As you have not mentioned any programming language, I am writing code in python. income =…
Q: Create a program that receives a student's name as input and then outputs a threecharacter ID for…
A: String manipulation Methods in Java: toLowerCase(String): This method converts the string case from…
Q: Q1/ Write a program that reads from the user the number of students in the class and their grades in…
A: Note: As no language is mentioned, therefore answering in python Input : Number of students Grade…
Q: his is a program written in C programming language. The wrong this is that this must be an…
A: Here we have to make use of loops to iterate till both strings match so that we can input password…
Q: how do i code this in python? A cookie recipe calls for the following ingredients: • 1.5 cups of…
A: I give the code in Python as per your requirement along with code and output screenshot
Q: and max both in Celsius and in Fahrenheit. The formula for converting from Celsius to Fahrenheit is…
A: According to the question, we are going to create a program where the temperature will be shown in…
Q: he Billy Goat Fast-Fast Food restaurant sells the following products: Product Price ($)…
A: items = ['Cheeseburger','Pepsi','Chips']price = [2.49,1.00,0.59]print('Items\t\t\tPrice($)')for i in…
Q: In business applications, youare often asked to compute the mean and standard deviation of data. The…
A: Program Plan: input number using for loop. Use for loop to compute mean. Use another for loop to…
Q: You'll be creating a program that will find a donut shop at the user's provided zip-code and…
A: The Complete answer in Java Programming is below:
Q: Write a C# application for a furniture company; the program determines the price of a table. Ask the…
A: Algorithm: To create this program we are using the if else conditional statement. Here using…
Q: tch (m) {case 0: printf(" the number is low\n"); break; case 1:
A: Code: #include <stdio.h> int main (void) { int m; printf ("enter an integer number between…
Q: please code in python You are probably familiar with the famous Fibonacci sequence of numbers,…
A: The question is to write the recursive python code for the given problem.
Q: java a. The user is prompted to enter an integer. If they enter something other than an integer,…
A: try {input = scanIn.nextInt();} catch (InputMismatchException ime) {input = -1;//set input to -1…
Q: JAVA Requirements This program will take Names and Grades from a .txt file as input. We will then…
A: Actually, the given information is; The program must use a switch argument.• The program must Read…
Q: rice calculations, using the rules*: • The basic price of a ticket is $40. • Senior citizens (age >=…
A: the program is an given below : def main(): ticket_base_price = 40 name = input('Enter…
Q: Write a program that asks the user to enter today’s sales for five stores. The program should…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: C++ Write a program that takes in a line of text as input, and outputs that line of text in…
A: Program approach: Including header files Starting the main function Initializing string variables,…
Q: Create a program that receives a student's name as input and then outputs a three-character ID for…
A: ⦁ We have to write a program to get the initials of a name in lowercase and print that as a id…
Q: You are required to write a serial program that performs multiplication for two n-digits decimal…
A: C++ C++ is a general-purpose, object-oriented, middle-level programming language that is an…
Q: A number in base 2 (binary) is a number such that each of its digits is 0 or 1. To convert from…
A: import java.util.Scanner;public class Main{ public static void main(String args[])…
Q: You are playing a game that has two dice – one die has 6 sides numbered 1 through 6 and the second…
A: In the program below, I have generated random numbers to simulate the dices but you can modify the…
Q: Write a program that displays a given integer with the corresponding comma in place. Before, commas…
A: Answer: I have done code and also I have attached code and code screenshot as well as output
Q: Write a program that asks a user for an integer. Declare a variable num2. Let num2 : x++; Display…
A: We are going to write a C++ code which will ask user to enter an integer named x. Then we will…
Q: value) Suppose you save $100 each month into a savings account with an annual interest rate of 5%.…
A: Given: value) Suppose you save $100 each month into a savings account with an annual interest rate…
Q: please only write the code in your solution goes here part do not change anything else C++ #include…
A: In this question we have to complete the CoordTransform function to change the coordinated and the…
Q: rite a program that asks the user to enter an integer consisting of 4 digits only, and check w many…
A: Code is given below #include <iostream>using namespace std;int main() { int num,…
Q: Write a program that accepts the names of three political parties and the number of votes each…
A: Actually, program is a executable software that runs on a computer.
Q: Create a program that reads integers from the user until the enter key is pressed. Once all of the…
A: since programming language is not mentioned, I am attempting this in python, if you need it in any…
Q: Assuming that a user enters 9, 23, and 3 as input values one after another, separated by spaces,…
A: In step 2, you will get the answer.
Q: Oman electricity wants to calculate the discounts of its citizens for their electricity…
A: Start Input name, units, amount Calculate Bill Apply discount Print details Stop
Q: Write a program that displays a temperature conversion table for degrees Celsius and degrees…
A: The given is the problem to print the converted value of celsius degree to farenheit degree. The…
Q: Write a Python console application that prompts the user for a number. The application should return…
A: The asked code for the python program is given in the next step with explanatory comments.
Q: Q1/ Write a program that reads from the user the number of students in the class and their grades i…
A: Code:Specific language is not mentioned so i am giving the code in c++ langauge: #include…
Q: Write a program that will take user's three numbers and display them in ascending order. For…
A: Program approach: Declare variables a, b, and c. Input values from the user. Print user input. The…
Q: At a certain school, student email addresses end with @student.college.edu, while professor email…
A: Lets see the solution.
Q: Write a program that displays a table of pounds and equivalent weights in kilograms. You can find…
A: As no output is provided and no language is specified, I have written the program in Python The code…
Q: Finding Errors. Identifying the line/s containing errors that can cause the program not to run.…
A: The solution to the given problem is below.
Q: A number in base 2 (binary) is a number such that each of its digits is 0 or 1. To convert from…
A: code '; def main(): binary = input("Enter a 5 digit binary number: ") #input the binary…
Q: Write code using 999999999888888887777777666666555554444333221 Note; create means you must create…
A: Objective: This program should receive user input for the number of lines to display a pattern. The…
Q: Write a unit conversion program that asks the users from which unit they want to convert (gal, oz,…
A: //Code In Java import java.util.*; public class Main{ public static void main(String[] args) {…
Q: A controlled transaction solution for Joe's Pizza, your friendly neighborhood pizza shop. Joe only…
A: import java.util.Scanner;public class Main{ public static void main(String[] args) { int sum=0,num;…
Q: 1. Write an application that converts a weight in pounds into kilograms (1 pound equals 0.45359237…
A: Program Explanation- The pound-to-kilos conversion factor. To get user input, use the Scanner…
Q: A county collects property taxes on the assessed value of property, which is 60 percent of its…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner…
Q: HangmanAA.java For this program, you will create the game Hangman. (If you are unsure of how to…
A: Programming instructions: Create a class. In the main, create a scanner object to take input from…
Q: The Mastermind game board game is a code breaking game with two players. One player (your program)…
A: import randomsecretCode =[]for i in range (0,4): n = random.randint(1,9)…
Q: Your friend Angus thinks he might have a food allergy, so he wants to keep a diary of all the foods…
A: Here we are while using loop initially to read inputs that is food item from Angus .This loop gets…
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:
if it needs it can you plz use import.util.scanner for the code
A cookie recipe calls for the following ingredients:
• 1.5 cups of sugar
• 1 cup of butter
• 2.75 cups of flour
The recipe produces 48 cookies with these amounts of the ingredients. Write a program that asks the user how many cookies he or she wants to make, and then displays the number of cups of each ingredient needed for the specified number of cookies.
Input is number of cookies
Output is quantity of ingredients
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- The error is in line 52. It should be ( update line 52 with ) if ( exchangeCards == "Y" || exchangeCards == "y" )" This is the answer you gave me the last time. I need line 62! The answer you are giving me over and over again doesn't make sense and it's the same code that doesn't compile! Main.cpp #include <iostream>#include <string>#include <fstream>#include <iomanip>#include <sstream>#include "card.h"#include "deck.h"#include "hand.h"using namespace std;int main(){string repeat = "Y";Deck myDeck;Hand myHand;string exchangeCards;while (repeat == "Y" || repeat == "y"){cout << endl;myHand.newHand(myDeck);myHand.print();cout << endl;cout << "Would you like to exchange any cards? [Y / N]: ";getline(cin, exchangeCards);while (exchangeCards != "Y" && exchangeCards != "y" && exchangeCards != "X" && exchangeCards != "n"){cout << "Please enter Y or N only: ";getline(cin, exchangeCards);}if(exchangeCards == "Y"…increasingDigits.py: Write a program to count all integers from 1 to n(inclusive) that have all digits in increasing order, where nis given as a command-line argument. For example, • 5 is in increasing order (single digit)• 237 is in increasing order (2 < 3 < 7)• 227 is not (2 !< 2)• 427 is not (4 !< 2) $ python3 increasingDigits.py 3024PYTHON3 Complete the given function, encrypt_text that encrypts the variable text using the provided key by applying a modified version of Caesar’s Cipher with the following rules: The key will contain a word made up of the letters ‘u’ and ‘d’. The cipher will use the key to determine the direction of the shift, with a ‘u’ indicating that the character must be shifted upwards while a ‘d’ indicating a downward shift. The number of characters in the key will determine the number of positions to shift. The given text variable will only contain characters from the ASCII table with values between 32 and 126. If the key is invalid (empty string, contains characters other than u and d) or the text is invalid (empty string), no encryption occurs and the function returns the original text. If the text has more characters than the key, the key will loop through again to accommodate the additional text characters. An iterative approach should be used to solve this problem. Brute force…
- Write a program that prompts the user to enter twostrings and displays the largest common prefix of the two strings. Here are somesample runs: Enter the first string: Welcome to C++ ↵EnterEnter the second string: Welcome to programming ↵EnterThe common prefix is Welcome toHere is the assignment Write a program that prints the multiplication table but inserts a randomly generated incorrect value between 1 and 50 into a cell whose row and column are randomly selected. Make sure the program does insert an incorrect value. For example, if row and column of 3 and 4 are randomly selected, keep generating a random number to print for that location until it's not the right value of 12. Then, ask the user to tell where in the table the incorrect number is located by entering the row and column of the incorrect number. Print whether the user was right or not. If he or she was right, ask for and read the correct value; if not, the program must give the correct location and the correct number. My main issue: is how to set up the multiplication table? I've only learned the basics in C++ (loops and if statements).Many user-created passwords are simple and easy to guess. Write a program that takes a simple password and makes it stronger by replacing characters using the key below, and by appending "q*s" to the end of the input string. i becomes ! a becomes @ m becomes M B becomes 8 o becomes . Ex: If the input is: Mypassword The output is: Myp@ssw.rdq*s Write a program to get the above task done. Use switch statement to handle the conditional part of the code.
- You wish to display the following text using the print function in Python: >HSBGPG Human bone gla gene\transcript "BGP" GGCAGATTCCCCCTAGACODE What is the correct way to display this output in Python 3.xx? 2. A student is writing Python 3.xx code to read in a dna sequence using the following command: >>> dna=input("Enter a DNA sequence, please:"). The student tries three different ways to compute the index of the second occurrence of the string 'atg' in the dna sequence: A. >>> o1 = dna.find('atg') >>> dna.find('atg',o1+1) B. >>> dna.rfind('atg') C. >>> dna.find('atg',dna.find('atg')+1) Which one is the correct way?This is a python file Fix this code and the output is the attachment #filename: modValidateEmail.py def isValidMSUMEmail(email): if email.count('@') != 1: return False tmp= email.split('@') if len(tmp) == 0: return False userName = tmp[0] if not userName[0].isalpha(): return False for c in userName: if not c.isalpha() and c != '.': return False inst= tmp[1] if inst != 'mnstate.edu': return False else: return True #filename: UnitTestValidEmail.py from unittest import * from modValidateEmail import * class TestValidEmail(TestCase): #create a subclass of unittest.TestCase def testUserName(self): self.assertEqual(isValidMSUMEmail('.joe@mnstate.edu'),False) self.assertEqual(isValidMSUMEmail('joe4@mnstate.edu'),False) self.assertEqual(isValidMSUMEmail('joe$smith@mnstate.edu'),False) self.assertEqual(isValidMSUMEmail('joe.smith@mnstate.edu'),True) def…In Java Write a program that prints the 128-character ASCII table. It should print the tablein eight tab-separated columns. The first column contains a "Dec" heading (fordecimal number) with the numbers 0 through 31 below it. The second columncontains the ASCII characters associated with the numbers 0 through 31. The nextcolumns contain the subsequent numbers and associated ASCII characters. See thebelow sample output for details. Be aware that that output was produced by aprogram running in a console window in a Windows environment. If you runyour program in a different environment, the first 32 characters and the lastcharacter will probably be different from what’s shown below.Note that some characters display in a non-standard manner. For example, thenumber 7 corresponds to a bell sound. You can’t see a sound, but you can see thevacant spot for 7’s character in the below table. The number 8 corresponds to thebackspace character. You can’t see a backspace, but you can see how the…
- In Java Write a program that prints the 128-character ASCII table. It should print the tablein eight tab-separated columns. The first column contains a "Dec" heading (fordecimal number) with the numbers 0 through 31 below it. The second columncontains the ASCII characters associated with the numbers 0 through 31. The nextcolumns contain the subsequent numbers and associated ASCII characters. See thebelow sample output for details. Be aware that that output was produced by aprogram running in a console window in a Windows environment. If you runyour program in a different environment, the first 32 characters and the lastcharacter will probably be different from what’s shown below.Note that some characters display in a non-standard manner. For example, thenumber 7 corresponds to a bell sound. You can’t see a sound, but you can see thevacant spot for 7’s character in the below table. The number 8 corresponds to thebackspace character. You can’t see a backspace, but you can see how the…A company that wants to send data over the Internet has asked you to write a program that will encrypt it so that it may be transmitted more securely. All the data is transmitted as four-digit integers. Your application should read a four-digit integer entered by the user and encrypt it as follows: Replace each digit with the result of adding 7 to the digit and getting the remainder after dividing the new value by 10. Then swap the first digit with the third, and swap the second digit with the fourth. Then print the encrypted integer. Write a separate application that inputs an encrypted four-digit integer and decrypts it (by reversing the encryption scheme) to form the original number java programmingUse C# (:Write an app that reads in a 5 digit number and determines if it is a palindrome. A palindrome is a number that reads the same backward as it does forward, for instance: 12321, 44444 or 22722. If the number inputted is not 5 digits long, display an error message and allow the user to input another number.