Excercisel: write a program to enter a user name and display the message (hello) three times. The first one for (Mena), the second one for (Nastia) and the third for any user as a guest. (For example, hello mena, hello Nastia et.al.)
Q: Write a program that will determine if a number is positive or negative. If positive it should be…
A: Given: Write a program that will determine if a number is positive or negative. If positive it…
Q: Write a program that calculates the average word length in a sentence entered by a user.
A: please do upvote for mt efforts thanks! answer: if __name__ == '__main__': s = input("Enter the…
Q: Write the server program that receives a number from a user and calculates the square root of the…
A: Program: import java.util.Scanner; public class KboatRoots{ public static void main(String…
Q: 2B. Given x=3 and y=6, what is the value of z after the expression z=x*y==18 is executed?
A: Note: There are multiple questions are given in one question. According to the rule, you will get…
Q: 3. Write a program that plays a guessing game with the user. The program should generate a random…
A: According to the information given:- We have to follow the instruction in order to create guess game…
Q: Write a program that displays the differences between the first and last, the second and next to…
A: Program description: n is the user input integer variable that stores the number of elements in the…
Q: Exercise 2: Write a program that uses input to prompt a user for their name and then welcomes them.…
A: Explanation: You did not mention programming language so I did this program using c,c++, java, and…
Q: Write a program continuously asks the user to enter a sentence until they type "-999".
A: The following is the required python program #the function definition for uppercasedef…
Q: What gets printed after executing the following code? void main ()( string sl = "Hello\"C++\""; cout…
A:
Q: 6. A microwave oven manufacturer recommends that when heating two items, add 50% to the heating…
A: Hey, since multiple questions posted, we will answer first question according to our policy. If you…
Q: Write a program which prints words of a string in reverse order for example if a user enter “I love…
A: Code: i am giving the code in java as you have not mentioned the language import java.util.Scanner;…
Q: Write a program that reads from a student his/her name and his/her ID which is formed of 8 digits.…
A: The solution to the given problem is below. **Note: As programing language is not mentioned in the…
Q: Rewrite Programming Exercise 1.11 to prompt the userto enter the number of years and display the…
A: Note: Since, programming language is not mentioned in the question, we will answer this question in…
Q: Homework01. Write a Java program that prompts the user to enter the seconds as a String (e.g.,…
A: - The question is to complete the conversion.
Q: 1. Write a program to enter a user name and display the message (hello) three times. The first one…
A: Need to write program to enter a user name and display the message (hello) three times. First one…
Q: 7. Write a program that asks the user's name, and then greets the user by name. Before outputting…
A: The problem is based on writing the code to input users' name and to greet the user after converting…
Q: Exercise 1: A palindrome is a string of characters that reads the same for- wards as backwards. For…
A: #include<iostream>using namespace std; //main methodint main(){ //declare required variables…
Q: Write in symbolic form: For all integers x,there exists an integer y such that the sum of x and y…
A: A symbolic form of quantifier use symbols like ∀,∃ etc. to represent the statement. It help to…
Q: Complete the following program that collects an input word from the keyboard and finds if the word…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Excercise1: write a program to enter a user name and display the message (hello) three times. The…
A: Note: Since programming language is not specified we are providing solution in python programming.…
Q: Voltage readings are obtained from an electrical substation once every hour for six hours Write a…
A: The Program language is not mentioned here. So, I am using C language to answer your question. The C…
Q: Exercise 1: In this exercise we are asked to write a program that prompts the user for a positive…
A: Input n if(n>0) { while(n>0) { r=n%10; //find remainder…
Q: Programming Exercise 4.17 gives a program that plays the scissor, rock, paper game. Revise the…
A: Given: Programming Exercise 4.17 gives a program that plays the scissor, rock, paper game. Revise…
Q: أسئلة على لغة اسمبلي 1-Write a program to read a letter in lower case then convert this letter to…
A: 1) .MODEL SMALL.STACK 100H.DATA CR EQU 0DHLF EQU 0AH MSG1 DB 'ENTER A LOWER CASE LETTER $'MSG2 DB…
Q: 2B. Given x=3 and y=6, what is the value of z after the expression z=x*y=%=18 is executed?
A: Note: There are multiple questions are given in one question. According to the rule, you will get…
Q: In C++ language, create a program that gets quarterly sales from a user, and calculates the total of…
A: pseudocode :
Q: Procedure 2. Write a program that takes the x-y coordinates of a point in the Cartesian plane and…
A: Concept: If X is +ve and Y is +ve, then Quadrant is 1 If X is +ve and Y is -ve, then Quadrant is 4…
Q: Complete the following program that collects an input word from the keyboard and finds if the word…
A: Solution Code word = input("enter")is_palindrome = Truei=-1for j in range(len(word)): if word[j]…
Q: Write a program that reads the marks of a student in the test (te), midterm (mid), assignment…
A: I am uploading the handwritten solution in the next step. As there is no programming language…
Q: Exercise 6: Two points in a plane are specified using the coordinates (x1, y1) and (x2, y2). Write a…
A: Since it is unclear which question you want, my code below is answer to both questions 6 and 7.
Q: 5. Write a program that determines the change to be dispensed from a vending machine. An item in the…
A: The program accepts the input value to a variable. It declared other variables for storing the…
Q: Make a flowchart where a program dispenses cash at an ATM machine that has been upgraded to dispense…
A: Since you needed the output screenshot I am attaching for both conditions thatis when amount is…
Q: In C++ language, create a program that gets quarterly sales from a user, and calculates the total of…
A: - We need to code for the sales program.
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: ifelseC++ä Exercise 5. Write a program that will calculate the price for a quantity entered from the…
A: #include <stdio.h> int main(void) { int quantity = 0; int price = 5; double total =…
Q: Write a program to check whether the message received at the destination is error-free. For…
A: Algorithm 1. Declare variable length1 and length2 to record length of both the sequence 2. Start…
Q: At a certain school, student email addresses end with @student.college.edu, while professor email…
A: Lets see the solution.
Q: Procedure 2. Write a program that takes the x-y coordinates of a point in the Cartesian plane and…
A: #include <stdio.h>void quadrant_of_x_y(float x, float y){ if (x > 0 and y > 0)…
Q: Question # 8: Write a program that inputs a number and checks whether it is a perfect number or not.…
A: Answer 8: Objective: The program reads the user input and verifies if the number falls under the…
Q: Exercise : Make a program that takes 5 test scores from the user, calculate the average Score and…
A: According to the Question below the Solution: Output:
Q: a. Write a program that reads your id and full name and display. And also display the index of first…
A: Since no programming language is mentioned, I am using python. Algorithm: Start Read id and name…
Q: Exercise 1 Write a Java program that computes the sum of even numbers less than or equal to n where…
A: A java program that computes the sum of even numbers less than or equal to N
Q: Java or C++ program to display the given output -----Library System---- 1. Add a Student 2. Add a…
A: /* import packeges and necessary classs */import java.lang.*;import java.util.Scanner;import…
Q: Use C++ programming language A customer in a store is purchasing five items. The prices of the…
A: Algorithm: Start Store the price of 5 items in p1,p2,p3,p4 and p5 variables Print p1,p2,p3,p4 and…
Q: Complete the following program that collects an input word from the keyboard and finds if the word…
A: PROGRAM CODE: word = input("Enter a word: ") // take the word from the…
Q: Write a program that takes a number from user and display the output as shown in below two runs of…
A: Given To do pattern program as sample program and input is taken from the user
Q: The goal of this program is to input one number consisting of five digits (in one word) from the…
A: import java.util.Scanner; class Digit { // 2. two private members private String digit;…
Q: C Write a program for user to check that it is able to vote or not. voting age must be 18 or above
A: Requirements :- C Write a program for user to check that it is able to vote or not. voting age must…
Step by step
Solved in 3 steps with 1 images
- Help needed ASAP! Language: JAVA Fill in your code for the following program that takes two words as input from the keyboard, representing a user ID and a password, then the program does the following: If the user ID and the password match “admin” and “open”, respectively, then output “Welcome”. If the user ID matches “admin” and the password does not match “open”, output “Wrong password”. If the password matches “open” and the user ID does not match “admin”, output “Wrong user ID”. Otherwise, output “Sorry, wrong ID and password”. import java.util.Scanner; public class Login{ public static void main(String[] args){ Scanner scan = ____ Scanner(________);//instantiate a Scanner object String userID = scan._________; // read the user ID String password = scan.__________; // read the password if(________________________________) { System.out.println("Welcome"); } else if(___________________________) { System.out.println("Wrong password"); } else…TASK " Write a program that grades students' exam. The exam has 20 multiple choice questions. Here are the correct answers: 1- A 6- B 11-C 16- D 2- A 7- B 12- C 17- D 3- А 8- В 13-С 18- D 4- А 9- В 14- С 19- D 5- A 10-B 15- C 20- D "A student must correctly answer 15 of the 20 questions to pass the exam. " Write a class named StudentExam that holds the correct answers to the exam in an array. TASK (CONT.) " The class should also have an array that holds the student's answers. The class also should have the following methods: I passed. Returns true if the student passed the exam, or false if the student failed " totalCorrect. Returns the total number of correctly answered questions I totallncorrect. Returns the total number of incorrectly answered questions " questionsMissed. An int array containing the question numbers of the questions that the student missed. 1 On another class, ask the student to enter his name, take his answers and display the results returned from the StudentExam…9. Write a program that reads from the user a sentence. The program should count the number of occurrences of the character 'a' in the sentence. 10. Write a program that reads from the user 10 words. The program then should count and print the number of words that start with character 'a'.
- 2. Write a program with a user interface which allows the user to enter 2 integers. It should then give him the option of adding them, subtracting them, multiplying them or dividing them. It should then print the result. 3. Write a program with a user interface to allow a user to enter a number and to tell him whether the number is even or odd Use the truncating property of intProgramming Language: Java Direction: Write a program to determine the number of PASSED and FAILED out of 15 inputted names with the corresponding grade. Restrict the inputted grade for each name in the range of 50 to 100, in which 75 is the passing grade. If the inputted grade is not on the range, the program will remind the user of a message for the accepted range for the grade and allows the user to re-enter a grade. NOTE: MUST ADD COMMENTS4. Area of a Rectangle • Write a program that compares the area of two rectangles. You can do this several ways. one way is to add the length and width of each rectangle to get it's area and then compare the two areas together. • The program should ask for the length and width of two rectangles and then tell the user which rectangle has the greater area, or if the areas are the same. • The area of a rectangle is the rectangle's length times its width. Name the source code file yourName HW4.py. • Test and run the program. Capture the output console and save it as an image file named yourName HW4 output.jpg. • Submit the py and the image files through Canvas. Note: Sample output below: Fast l: Code-Tracing Output in comenta Vart 21 Days of the Week
- QUICK-BASIC64 In a 50-person class, students with grades below 70 are considered unsuccessful. Write an algorithm that calculates students who fail the exam. (Please explain everything the program in details and please check whether the program runs or not by using q- basic64. Thank you so much)Directions: Write a program that will perform a casino game using C. Provide comments in the codeexplaining everything. See above deliverable instructions. Requirements: A menu will first appear asking the user to choose which game they would like to play. The userwill be able to choose between blackjack and roulette.The blackjack game will only play one hand at a time against the dealer. If the dealer and the user have the same,then it’s a draw. If you do not know how to play blackjack, then you might need to research the game.The roulette game will ask the user what numbers they would like to bet on. If the random number is chosen, thenthe user wins.Each game should ask the user how much money they would like to bet before the game starts. The user shouldhave a starting amount of money, once the user loses their money, the user will then need to stop playing. Expert Solution1. 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…
- Assignment Write a program that moves a forester unit and a desert corps unit to a given target location and prints the number of hours it took for each unit to reach the target. First, the user will give the starting X and Y positions of the forester unit as well as its base speed (all ints). Then, the starting X and Y positions of the desert corps unit as well as its base speed (all ints). Finally, the target X and Y positions (both ints) and the terrain type (std::string). Speeds are given as distance traveled in one full day (i.e., 24 hours) and is affected by the terrain type using a multiplier over the base speed. Also, after 1 full day, each unit rests for a certain number of hours. Speed multiplier and rest amount of each type of unit depending on the terrain type are as below. Speed Multiplier Rest Duration After 1 day Terrain type Forester Desert Corps Forester Desert Corps Forest 1.3 0.6 4 12 Desert 0.4 1.2 15 6 Hills 0.7 0.8 6 8 Others 1.0 0.8 8 6 After getting all this…Q: At a certain school, student email addresses end with @student.college.edu, while professor email addresses end with @prof.college.edu. Write a program in python that first asks the user how many email addresses they will be entering, and then has the user enter those addresses. After all the email addresses are entered, the program should print out a message indicating either that all the addresses are student addresses or that there were some professor addresses entered.Exercise 4 Write a program that allows a user to play HiLo game. User wins if he/she can guess the number between 1 and 100 within at most 6 iterations. • If s/he guesses a number greater than the secret number. The message shown is "It is Higher than secret shown" • If s/he guesses a number lower than the secret number. The message shown is “ It is Lower than secret" • If the guessed number equal to the secret number. The message shown is "Cong! you won" • If the user consumed the 6 trails without finding the secret number a message "Sorry! Try again" will be shown before termination. Output - CppApplication_1 (Run) #3 Enter a positive integer seed value: 100 Enter your guess : 40 It is Higher than secret Enter your guess : 20 It is Higher than secret Enter your guess : 10 It is Lower than secret Enter your guess : 15 It is Lower than secret Enter your guess : 17 It is Lower than secret Enter your guess : 18 Cong! you won PE Output