Write a program that asks the user for a word, then prints out the word once on the first line, twice on the second line, and three times (thrice) on the third line: What did you say? Hello Hello Hello Hello Hello Hello Hello
Q: Write a program in kotlin to add two given numbers and print the results.
A: Required:- Write a program in kotlin to add two given numbers and print the results. approach:-…
Q: Write a Python program that prompts the user for the cost of two items to be purchased. Then prompt…
A: PROGRAM EXPLANATION: Start. Take the cost of the first item as input. Take the cost of the second…
Q: Write a Python program that will ask a user for a number, then determine whether it is odd or even.…
A: Even numbers are those numbers that are completely divisible by 2. Odd numbers are those numbers…
Q: Write a program in python that asks the user to enter a word and then capitalizes every other letter…
A: Capitalize every other letter in string using python code
Q: Write a program that asks the user for a word, then prints out the word between the word bread, to…
A: Please find the answer below :
Q: Write a program that accepts a number entered by the user and validates if it is odd oreven. If it…
A: Sample Response: #python3 program#accept a numbernum = int(input("Enter a number: "))#validate the…
Q: Write a program named Twitter that accepts a user's message and determines whether it is short…
A: using System;public class Twitter { static void Main() { //program starts…
Q: Write a program that reads a bank aCcount balance and an interest rate and displays the value of the…
A:
Q: Write a program that prompts the user to enter a three-digit integer and determines whether it is a…
A: JAVA CODE IS GIVEN BELOW:
Q: Write a program which replaces all vowels with their corresponding numbers (e.g. a is 1, e is 2, i…
A: Algorithm : Step 1 : ask for the word from the user. Step 2 : declaring and initializing string…
Q: Write a program that asks the user for a number of seconds and prints out how many minutes and…
A: Program: To asks the user for a number of seconds and print as minutes and seconds format.…
Q: Write a python program that prompts the user for a word. If the word comes between the words apple…
A: PROGRAM: #Getting word word=input("Enter the word: ") #Checking word if(word>"apple" and…
Q: Write a program which reads two integer numbers from users and then display all prime numbers within…
A: According to the Question below the Complete Program: Program Output:
Q: Write a program that reads from the user a number that represents its grade, and then displays a…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program that asks the user the number of hours an employee worked and his hourly wage,…
A: #include <iostream>using namespace std; int main() { int hours=0,wage=0; double…
Q: Write a program for weekdays. Read a number, between 0 and 6, from keyboard, and then print out the…
A: C program for weekdays. Read a number from 0 to 6. Using the switch function Display the…
Q: Write a program that asks the user for a line of text and counts how many spaces, periods, or commas…
A: Since you have not mentioned any language, i will code it in python.
Q: Write a program that will ask the user to input a letter 'm' or 'f and then it will display "Hello…
A:
Q: Write a program to prompt the user for their age. Based on their age print out which generation they…
A: If age>21 and age<36 You are generation millennials. Youth ends at 40, old age begins at 59.…
Q: Write a program which prompts the user for a number and prints the numbers from 1 up to that number,…
A: ALGORITHM:- 1. Take the value of n as input from user. 2. Generate the numbers from 1 to the input…
Q: Write a program that reads a four-digit number from user, then the program separates digits of the…
A: code
Q: Write a program that takes 7 numbers from the keyboard, count the positive numbers, sum the positive…
A: Below is the required code in C++ language. Approach to Program: Include a necessary header files…
Q: Write a program that asks the user for a number and prints out 100 divided by the number: Enter a…
A:
Q: Write a program that asks the user for a word, then prints out the word once on the first line,…
A: Programming Language => C++ I have provided C++ CODE along with CODE SCREENSHOT and…
Q: Write a program that accepts a number and determines whether the number is even. If it is even,…
A: Here I written C code for given even problem below. I hope you like it.
Q: Write a program that receives a number from a user and checks if it's float or integer. In case of…
A: First we declare the number variable, which gets input from the user. Also, we declare a variable…
Q: Python program that will ask a user for a number, then determine whether it is a prime number or no
A: Write a Python program that will ask a user for a number, then determine whether it is a prime…
Q: Write a program that reads a mark from the user and prints an appropriate message. When the input…
A: Following program will take the input from the users,and it will print the Remarks based on the…
Q: Write a program for determining if a year is a leap year. In the Gregorian calendar system you can…
A: Answer :
Q: Write a program that takes two string as a user input such as: 1. “hello world" 2. “hello people"…
A: Program code: #include <stdio.h> #include <string.h> int main() { //Declare the…
Q: Write a program that will ask the user to enter an integer number and display the message r even…
A: An even number is a 2-fold integer. An integer not precisely divided by 2 is a mysterious number.…
Q: Write a program that begins by reading a temperature from the user in degrees Celsius. Then your…
A: Given: To Write a program that begins by reading a temperature from the user in degrees Celsius.…
Q: Write a program for determining if a year is a leap year. In the Gregorian calendar system you can…
A: Since programming language is not mentioned, I have done this using Python 3.
Q: • Write a program that asks the user for a number n and prints the sum of the numbers 1 ton. By used…
A: <!DOCTYPE html><html><body><script>//asking user to enter valuevar…
Q: Write a simple LMC (little man computer) program that requests the user to input3 numbers (say, A,…
A: 1. input first number 2. store in first using sta 3. input second number using inp 4. add it to…
Q: Write a python program that asks the user how many credits they have taken. If they have taken 23 or…
A: Python program Prompt the user to enter the credits they have taken. Store the user entered…
Q: Write a program that asks the user for a negative number, then prints out the product of all the…
A: Solution: Since any specific language for the above question is not mentioned, we have solved…
Q: In python, write a program that receives an integer, greater than or equal to 2, from the user and…
A: What is Python? Python is a widely used high-level, general-purpose programming language for…
Q: Write a program in JAVA language to take input a positive integer from the user and check if that…
A: Write a program in JAVA language to take input a positive integer from the user and check if that…
Q: Write a program that takes 7 numbers from the keyboard, count the positive numbers, sum the positive…
A: Below is the required code in C++ language. Approach to Program: Include a necessary header files…
Q: In python, write a program that receives an integer from the user, called n, and prints the first n…
A: In this question we need to write a python program which takes an integer input n from user and…
Q: Write a program that asks the user his/her name(first letter), semester, mlarks, and age and then…
A: Code : import java.util.*;class input{ public static void main(String[] args){ Scanner input = new…
Q: Write a program that asks the user for a number, and divides it by 2 then prints out the result:…
A: As per the requirement here I am providing the code. Here is the algorithm. Step 1: Start Step 2:…
Q: Write a Java program to take the string and word from the user and check whether that word is…
A: ANSWER: Java Program:
Q: Write a program that mimics a calculator. The program should take as input two integers and the…
A: # Program make a simple calculator # This function adds two numbers def add(x, y): return x + y #…
Q: Write a simple LMC(little man computer) program that requests the user to input 2 numbers (say, Aand…
A: Program: INP STA M0 INP STA M1 SUB M1 BRP J1 LDA M1 J1 LDA M1…
Q: Write a program that asks the user for an animal sound, then prints out that sound twice on the same…
A: the answer is given below:-
Q: Write a program that accepts a number entered by the user and prints its Fibonacciseries up to 10…
A:
Algorithm:
- Input word from user
- Append a space to the input word
- Iterate a for loop for variable i in range(1,4)
- Printing the word once, twice and thrice
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
- This is the question - Write an application that prompts a user for a month, day, and year. Then display the appropriate message: Y is not this year M was a month earlier this year M is a month later this year M is this month This is the code I have for it so far - import java.util.*; import java.time.*; public class PastPresentFuture { public static void main (String args[]) { LocalDate today = LocalDate.now(); LocalDate enteredDate; int mo, da, yr; int todayMo, todayDa, todayYr; Scanner input = new Scanner(System.in); System.out.print("Enter a month >> "); mo = input.nextInt(); System.out.print("Enter a day >> "); da = input.nextInt(); System.out.print("Enter a year (four digits) >> "); yr = input.nextInt(); } }Write a program that reads a word and prints whether it is short (fewer than 5 letters).it is long (at least 10 letters).it ends with the letter y.starts and ends with the same letter.words.cpp 12345678910111213141516171819202122232425262728293031323334#include <iostream>#include <iomanip>#include <string>using namespace std;int main(){ cout << "Enter a word: " << endl; string word; cin >> word; if (. . .) { . . . } if (. . .) { . . . } if (. . .) { . . . } if (. . .) { . . . } return 0;}CodeCheckResetMany 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. You may assume that the string does not contain spaces and will always contain less than 50 characters. i becomes ! a becomes @ m becomes M B becomes 8 o becomes . Language is C
- JAVA Program modify this program below: so it does not use a while loop. Instead it uses recursive method that doesn't copy the string over and over again. import java.util.Scanner;public class PalindromeChecker { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (true) { System.out.print("Please enter a string to test for palindrome or type QUIT to exit:\n"); String input = scanner.nextLine().toLowerCase(); if (input.equals("quit")) { break; } if (isPalindrome(input)) { System.out.println("The input is a palindrome."); } else { System.out.println("The input is not a palindrome."); } } } private static boolean isPalindrome(String str) { str = str.replaceAll("[^a-zA-Z0-9]", ""); int left = 0; int right = str.length() - 1; while (left < right) { if…Write a program using a codeblock that consists of the following algorithm: num1 =4, num2= 4* 5-11, sale = 0.02 * 1000, first =‘D’, str = “It is a sunny day”. .Your program has to display the results for num1, num2, sale, first and stringIn Java. Sort the list of cars and display them. Sort by make, model, and year. Each car property is separated by a tab character: \t Output width: 15 (make), 25 (model), 5 (year) I already have a code but it doesn't sort right. import java.util.*;import java.io.*;class Test{public static void main(String args[]){try{File file=new File("cars.txt");Scanner sc=new Scanner(file);sc.nextLine();while(sc.hasNext()){String line=sc.nextLine();String data[]=line.split("\t");String make=data[0];String model=data[1];String year=data[2];System.out.printf("%15s%25s%5s\n",make,model,year);}}catch(Exception e){System.out.println(e);}}} ////////////////// cars.txtmake model yearFord Expedition 2003Mazda B-Series 1989Ford Freestar 2003Hyundai Elantra 2001Hyundai Entourage 2008Chevrolet Camaro 2011Chevrolet Monte Carlo 2006Chevrolet Blazer 1996Chevrolet Aveo 2005Chevrolet Corvette 1999Mercedes-Benz E-Class 2006Dodge Avenger 1995Pontiac Grand Prix 1973Mitsubishi Outlander 2011MINI Clubman 2011Suzuki…
- // Program displays some facts about a string public classDebugSeven3 { publicstaticvoidmain(String[] args) { String quote = "Honesty is the first chapter in the book of wisdom. - Thomas Jefferson"; System.out.println("index.of('f') is: " + quoteindexOf('f')); System.out.println("index.of('x') is: " + quoteindexOf('x')); System.out.println("char.At(5) is: " + quote.charAt(50)); System.out.println("endsWith(\"daughter\") is: " + quote.endsWith("daughter")); System.out.println("endsWith(\"son\") is: " + quote.endsWith("son")); System.out.println("replace('e', '*') is: ", quote.replace('e', '*')); } }Please read the instructions carefully and keep in mind of the bolded phrase. 1. Create a Netbeans project and name it Test. 2. In the main method, ask the user for a string of letters. 3. Create a RECURSIVE (with loops, but CANNOT use duplicated strings) method that prints all the substrings of the input string in this order: If the user enters "abcd", the substrings will be: a ab abc abcd b bc bcd c cd d 4. The recursive method's signature is as follows: public static void printSub2(String s)One interesting application of computers is drawing graphs and bar charts.Write a program that prompts the user to enter 5 integers, and then outputs abar chart consisting of asterisks. The number of asterisks in each line of thebar chart must be equal to the number the user entered. You may assume theuser will enter only positive integers or 0. C++ please.
- Machine Problem:Write a Java or C++ program that will display the given menu: -----A Simple Library System----1. Add a Student2. Add a Book3. Display All Students4. Display All Books5. Search a Student6. Search a Book7. Borrow a Book8. Display Borrowed Books9. Return a Book (optional)10. Exit ➢ When 1 is chosen, ask the user to enter the student’s information(5-digit ID number,surname, first name, age, and sex)➢ When 2 is chosen, ask the user to enter the book’s information(5-digit book number,Title, Author’s name(Surname, first name), date of purchase, and status (available/notavailable))➢ When 3 is chosen, display list of all students(5-digit ID number, surname, first name,age, and sex)➢ When 4 is chosen, display list of all books(5-digit book number, Title, Author’sname(Surname, first name), date of purchase, and status (available/not available)➢ When 5 is chosen, ask the user if he wants to search the list by Surname or IDnumber. If record is found, display the corresponding…Please read the instructions carefully and keep in mind of the bolded phrase. 1. Create a Netbeans project and name it Test. 2. In the main method, ask the user for a string of letters. 3. Create a RECURSIVE (WITHOUT LOOPS, but can use duplicated strings) method that prints all the substrings of the input string. The recursive method's signature is as follows: public static void printSub1(String s) 4. If the user enters "abcd", the recursive method will return the substrings in the this order: abcd abc ab a b bc b c bcd bc b c cd c dJAVA Program modify this program below: take out while (true) { and use something else. Instead it uses recursive method that doesn't copy the string over and over again. import java.util.Scanner;public class PalindromeChecker { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (true) { System.out.print("Please enter a string to test for palindrome or type QUIT to exit:\n"); String input = scanner.nextLine().toLowerCase(); if (input.equals("quit")) { break; } if (isPalindrome(input)) { System.out.println("The input is a palindrome."); } else { System.out.println("The input is not a palindrome."); } } } private static boolean isPalindrome(String str) { str = str.replaceAll("[^a-zA-Z0-9]", ""); int left = 0; int right = str.length() - 1; while (left < right) {…