Day of the Week Calculator For this assignment you will write a program that will allow you to enter a date and will output what day of the week that date fell on. Here is an example of how it should look when you run it: Enter a date (month day year): 3 5 2020 That day is a Thursday
Q: 1. [LO 1, LO 2, LO 3 & LO 4, Treasure Hunter Description You are in front of a cave that has…
A: Answer: I have done code and also I have attached code and code screenshot as well as output
Q: Language: JAVA Leap-Year Write a program to find if a year is a leap year or not. We generally…
A: import java.io.*;import java.util.*;class LeapYear { public static void main(String args[]) throws…
Q: Each code example is incorrect. Indicate why! (2 errors each) 1. if (i=0)// //...code…
A: Computer programming or the code is the communication between computers and users. Creating a code…
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: Personal BestWrite a program that asks for the name of a pole vaulter and the dates and vaultheights…
A: Given:- Personal BestWrite a program that asks for the name of a pole vaulter and the dates and…
Q: (Rounding Numbers) Function floor can be used to round a number to a specific decimal place. The…
A: Given: (Rounding Numbers) Function floor can be used to round a number to a specific decimal…
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: ach trial, you have to inform the user, either he/she has guessed it correctly or not, and the…
A: //Source code in python import random import math //Taking inputs lower=int (input("Enter Lower…
Q: (Algebra: solve quadratic equations) The two roots of a quadratic equation ax? + bx + c = 0 can be…
A: For the question we need user to input value for a,b,c. Then we will check value of b^2 - 4ac And…
Q: Write a program that prompts the user to enter the number of hours a car is parked at the airport…
A: Assuming the formula, Parking fee, F is calculated as 5, 0 ≤ h ≤3F = {6 ×int (h+1),…
Q: Part B: Chore Bonus Your parents pay you $3 for each trash bag full of leaves you rake. If you can…
A: According to the information given:- We have to follow the instructions mentioned to get the desired…
Q: Problem Description: The international standard letter/number mapping found on the telephone keypad…
A: The pseudocode is as follows:Prompt user for a letter in upper caseReceive the input.Convert the…
Q: Questioin: Hidden Secret Problem! In this problem, you are given two names, you have to find…
A: Program Plan: Enter the number of cases. Enter the two strings for each case. Convert both the…
Q: (Cost of driving) Write a program that prompts the user to enter the distance to drive, the fuel…
A: Since, the programming language is not mentioned, below is the complete c++ program:
Q: Scissor, rock, paper Write a program called GameSRP.java that plays the popular scissor-rock-paper…
A: We have to write a JAVA code foe Scissor, Rock and Paper with our computer. It will be continuous…
Q: 15. Overloaded Hospital Write a program that computes and displays the charges for a patient's…
A: Required:
Q: Java Programming Travel Tickets Company sells tickets for airlines, tours, and other travel-related…
A: Prompt and read the ticket_number Convert the string ticket_number to the long integer and store it…
Q: (Return number of digits) Write a function that returns the number of digits in an integer using the…
A: program approach returns number of digits if number is 0 return 1 else to hold count of number…
Q: Enter the number of days: Day Cents $ 0.01 2 $ 0.02 3 $ 0.04 4 $ 0.08 $ 0.16 $ 0.32 $ 0.64 $ 1.28 $…
A: Find Your Code Below
Q: Assignment Write a program that calculates the revenue of a trip of a train composed of several…
A: Dear Student, As no programming language is mentioned so, I am coding it in c++. I will also provide…
Q: Write a program that calculates your grade in this class based on weights for each category and…
A: Algorithm Start Recieve input score from user for reading assignment and assign it to a variable(…
Q: (Simple computation) The formula for computing the discriminant of a quadratic equation ax^2 + bx +…
A: Given Information-The quadratic equation is shown below- 3x2 + 4x + 5=0Comparing it to standard…
Q: 4. (Calory.java) Write a program that asks the user to enter the number of calories and fat grams in…
A: PROGRAM INTRODUCTION: Import the required libraries. Start the definition of the main function.…
Q: T/F 9) The assignment statement d = p; is legal even though d is not a Poodle.
A: Please find the answer to the above question below:
Q: Hospital Patients Write a program that computes and displays the charges for a patient’s hospital…
A: Programming is a way to instruct the computer devices to operate. Every computer needs a set of…
Q: 10) The assignment statement p = d; is legal even though p is not a Dog.
A: Please see the next step for solution
Q: Functions Write a program that computers and displays the charges for a patient's hospital stay.…
A: Write a c++ program for the given functions:
Q: Show the output of the following code:
A: a> ans: Program a after execution ,its output will be null. Because we have given amount=5;…
Q: Anagram words Write a C code that asks users to enter two words, one after the other and checks if…
A:
Q: (Simple computation) The formula for computing the discriminant of a quadratic equation ax^2 + bx +c…
A: 1) Since you have not specified programming language, I have written program in C language 2)…
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: function/method Write a program that asks the user for his first name and then prints it using a…
A: Code: import java.util.*;public class Main{ void printName(String s){…
Q: Write method IsEven that uses the remainder operator (%) to determine whether an integer is even.…
A: Program : import java.util.Scanner; public class Main { public static boolean isEven(int z){…
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: rite a program to help Buddy (the sheepdog) calculate the average age of all his sheep. The program…
A: #include <iostream>#include <iomanip>#include <string.h>using namespace std; int…
Q: onsider writing code that starts with the ima nage, resulting in the picture on the right be
A: var image=new Simpleimage("Chapel.png"); print(image);
Q: Python Assignment: In India McDonald's has the n number of customers and they are famous for their…
A: Required:
Q: Problem You have code that needs to perform simple time conversions, like days to seconds, hours to…
A: To perform conversions and arithmetic involving different units of time, use the datetime module.…
Q: There is a variable that adds up several numbers.
A: Introduction: Variables are any characteristics, numbers, or quantities that can be measured or…
Q: 24. Word Game Write a program that plays a word game with the user. The program should ask the user…
A: sample output
Q: ++ program int quadrant() This method will return at which quadrant does this point lie in our…
A: Required: C++ program int quadrant() This method will return at which quadrant does this point lie…
Q: (usually shown by a hand gesture) at the same time, and a winner is determined. In the game, Rock…
A: Code: import java.util.Scanner; public class Main { static Scanner scanner = new…
Q: Python Assignment: In India McDonald's has the n number of customers and they are famous for their…
A: Coded in Python 3.
Q: 4) Roll the dice 2 Make a program that tests the probability of a certain score when rolling x dice.…
A: Programming language is Visual Basic.NET Steps to create a visual basic.net project to perform the…
Q: Sports exercise advisor algorithm. In this algorithm you will start out with a temperature value in…
A: The given requirement is to develop an algorithm for deciding the sports exercise based on the…
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: Trivia Game In this programming exercise, you will create a simple trivia game for two players. The…
A: Question.py • Define the class named “Question”. ○ Define “__init__()” method for “Question”…
Q: (Simple computation) The formula for computing the discriminant of a quadratic equation ax^2 + bx +…
A: class Exercise01_01Extra { public static void main(String[] args) { // Declaring variables…
How would I write this code using Java?
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- (Simulation) Write a program to simulate the roll of two dice. If the total of the two dice is 7 or 11, you win; otherwise, you lose. Embellish this program as much as you like, with betting, different odds, different combinations for win or lose, stopping play when you have no money left or reach the house limit, displaying the dice, and so forth. (Hint: Calculate the dots showing on each die with the expression dots=(int)(6.0randomnumber+1), where the random number is between 0 and 1.)Microwaves / Radio Waves If a scientist knows the wavelength of an electromagnetic wave she can determine what type of radiation it is. Write a program that asks for the wavelength in meters of an electromagnetic wave and then displays what that wave is according to the following chart. (For example, a wave with a wavelength of 1E-10 meters would be an X-ray.) 1x 10-11 1 x 10-8 4 x 10-7 7x 10-7 1x 10-3 1 x 10-2 Gamma Rays. X Rays Ultraviolet Visible Light InfraredPython: VOWEL OR CONSONANT Challange Ask the user to input a word. The program will then tell them how many letters are in the inputted word. It will also tell them how many vowels and consonants are in the word. It will then ask which number (between 1- the length of their word - DO NOT USE THE PLACEHOLDER ZERO) that they would like to pick. It will then tell them whether that letter is a vowel or consonant. Next the program will pick a random letter from the word that was inputted, print that letter and tell the user whether it is a vowel or consonant: OUTPUT: What is your word?: Larry There are 5 letters in Larry. There are 1 vowel and 4 consonants For your word, L is "1" and Y is "5" Which letter do you want 1-5? 4 The letter you picked is an "r" and that letter is a CONSONANT and there are two of them I picked a random letter from your word, it is "a" The letter I randomly picked is a VOWEL Remember : vowels are "a, e, i, o, u" a "y",should output as "…
- 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-BasLast question, Coding done in Python. Math Quiz Design a program that gives simple math quizzes. The program should display two random numbers that are to be added, such as: 247 + 129 The program should allow the student to enter the answer. If the answer is correct, a message of congratulations should be displayed. If the answer is incorrect, a message showing the correct answer should be displayed. All coding done in Python.Python Assignment: In India McDonald's has the n number of customers and they are famous for their taste and quality so they plan to Organise the challenge for foody people. What is the challenge is?| you have taken a food challenge from the Chef and now you have to eat directly the Y burgers. You will eat as follows: At the first minute you will eat exactly the X burgers and every minute after that you will eat twice the number of burgers you ate the minute before. As you can get tired of food, Chef also lets you take a break from eating for one minute. When you start eating again after a break, your food streaks are reset, which means that in the first minute after the break you will eat X burgers and every minute after that you will eat the burgers you ate twice the last minute. Allow a1, a2, ., let it be your meal length in minutes. The cook needs to have all the ai different in pairs. Get the minimum number of minutes you need to eat Y burgers directly or decide that it is not…
- 1. Write a program that lets the user guess whether a randomly generated integer would be even or odd. The program randomly generates an integer and divides it by 2. The integer is even if the remainder is 0, otherwise odd. The program prompts the user to enter a guess and reports whether the guess is correct or incorrect.INFS3410 Practice Questions Chapters 1, 2 and 3 The Following is an example run of an educational program for school children. The program help kids to practice their additions and subtraction skills. Your task is to develop a program that can achieve the same exact thing. Bear in mind the following important guidelines: - The user may choose between additions and subtractions - The user may choose the difficulty level (easy, medium, hard) - The program should display 5 questions and calculate the total score - No two questions should be the same Please enter your name: Hafedh AlShihi ************** Hello Hafedh AlShihi Welcome to our Additions / Subtractions Practice ****k********* Which operation you want to practice? Type 1 for Additions, or Type 2 for subtractions: 2 Please select your difficulty level Type 1 for Easy (numbers 1 to 10) Type 2 for Medium (numbers 10 to 100) Type 3 for Hard (numbers 100 to 1000) 1 Here are 5 easy-level subtraction questions, please attempt all: How…17. Math Tutor Write a program that can be used as a math tutor for a young student. The program should display two random numbers to be added, such as 247 +129 The program should then pause while the student works on the problem. When the student is ready to check the answer, he or she can press a key and the program will display the correct solution: 247 +129 376
- Exercise I- Medicine Write a program that asks the user to enter the name of the medicine (t for ThroX, f for FeliX), his mass. The user should enter as well if he has a prescription or not. The program will calculate the dosage using: age and his ThroX without prescription -The max dosage should be 0.75 mL -The dosage = mass / 150 -The number of pills per day to take is 1 ThroX with prescription -The dosage =mass * 3 / 150 -The number of pills per day to take is 5 FeliX with prescription -The dosage = 0.77 mL FeliX without prescription -The dosage should be between 0.3 and 0.7 -The dosage = mass * 0.009 -The number of pills per day to take is 2 -The number of pills per day to take is 6 The program should display the dosage and the number of pills to be taken per day if the requirements are full filled, otherwise it display "Please check your doctor for a prescription". In case the medicine does not exist in the database, the program display “Your medicine is not in our database!"…15. Speed Conversion ChartYour friend Amanda, who lives in the United States, just bought an antique European sports car. The car’s speedometer works in kilometers per hour. The formulafor converting kilometers per hour to miles per hour is:MPH = KPH * 0.6214In the formula, MPH is the speed in miles per hour and KPH is the speed in kilometersper hour. Amanda is afraid she will get a speeding ticket, and has asked you to write aprogram that displays a list of speeds in kilometers per hour with their values convertedto miles per hour. The list should display the speeds from 60 kilometers per hourthrough 130 kilometers per hour, in increments of 5 kilometers per hour. (In otherwords, it should display 60 kph, 65 kph, 70 kph, and so forth, up through 130 kph.) made in visual studio 2017Exercise 2: Hospital Patients 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 inpatient or an outpatient. If the patient was an inpatient, 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 tests, etc.) The program should ask for the following data if the patient was an outpatient: Charges for hospital services (lab tests, etc.) Hospital medication charges The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient information. Both functions should return the total charges and display it for the user. After the total charges have been calculated and displayed, write the result to a file,…