Write a program that creates a login name for a user, given the user's first name, last name, and a four-digit integer as input. Output the login name, which is made up of the first five letters of the last name, followed by the first letter of the first name, and then the last two digits of the number (use the % operator). If the last name has less than five letters, then use all letters of the last name. Hint: Use the to_string() function to convert numerical data to a string.
Q: Write a program that reads in the first and last name of a person and formats the full name as the…
A: The Answer is in below Steps:-
Q: Write a program that asks users when their birthday is. Use information provided to give them their…
A: Program Approach - Use the header files as per the requirement for the code. Define the main…
Q: Write a program that asks the user for a word, then prints out the word once on the first line,…
A: Algorithm: Input word from user Append a space to the input word Iterate a for loop for variable i…
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 python program that asks the user to enter exam scores, the number is based on what the user…
A: def input_function(n, scores): print("Enter the score(s):") for i in range(n):…
Q: Write a program that will ask a user to input grades in Integral Calculus, Computer Programming and…
A: The given code is in Python.
Q: Write a program for Horizon Phones, a provider of cellular phone service.Prompt a user for maximum…
A: code :-- //for Scanner classimport java.util.*; public class Main{ public static void main(String[]…
Q: Write a program that prompts the user to enter the students’ names and their scores on one line, and…
A: Output:
Q: Write a program that asks the user for his name and salutes him using it. The prompt must be "What…
A: According to the Question below the solution: Output:
Q: Write a client program for MyTime which loops around getting strings from the user representing…
A: Actually, Java is a programming language originally developed by James Gosling at Sun Microsystems…
Q: Write a program that calculates the amount of money a person would earn over a period of time if his…
A: here in given question ask for python program.
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: umber of seconds, displays a message at every
A: Since the programming language is not mentioned, I have done the code using Java.
Q: write a program that read an excel sheet that contains some animals' nformation. The information…
A: Q: Code the given problem Language Used: Python
Q: In this lab work, you will implement a coffee shop example. In this coffee shop, everything must…
A: C program #include<stdio.h>#include<stdlib.h>float a;int b,c,d,e,f,sum=0;void milk();…
Q: Write a program that lets the user type some text, consisting of words separated by blanks, ending…
A: //note no programming language is mentioned so i was used python programming language def…
Q: Write a program that prompts the user to enter thecenter x-, y-coordinates, width, and height of two…
A: Since, programming language is not mentioned in the question, we will answer this question in Java…
Q: Solve in Python: Write a program that creates a login name for a user, given the user's first name,…
A: Here I have taken input from the user and stored it into 3 different variables. Next, I have…
Q: write a program that read an excel sheet that contains some animals' information. The information…
A: Below is the Python program for:- write a program that read an excel sheet that contains some…
Q: Write a program that simulates the proverbial game of Russian Roulette. The program will prompt the…
A: Given: Write a program that simulates the proverbial game of Russian Roulette. Theprogram will…
Q: Write a program that plays a guessing game with the user. The program should generate a random…
A: Required code for the Java program is given in the next step using a while loop for continuous…
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 Python program that asks a user for their name, age and password. If their age is less than…
A: Solution: Given,
Q: Write a program that simulates the normal operation of a modern elevator with 25 floors (levels) and…
A: Answer:)
Q: Write a program that prompts the user for a U.S. dollar amount and then converts it to Japanese Yen,…
A: Purpose: In this the dollar has to be converted into yen, Pound, Currency and then it has to…
Q: Write a program CheckDigit.java that takes a 12 or 13-digit long as a command-line argument and…
A: Program plan: Initialize the variables sum1, sum2. define the variable long number. Iterate over…
Q: Write a program that promotes the user to enter the number of students and each student's name and…
A: The java program and the approach that prompts the user to enter the names and the scores of the…
Q: Write a program that prompts and takes an input from a user with values ranging from 4 to 10 and…
A: We need to write a program in python language that display the diamond pattern given in the…
Q: Write a program that gets a series of three letter acronyms (kısaltma), calculates the average word…
A:
Q: Write a program that calculates and prints the bill for a cellular telephone company. The company…
A: C++ Code: #include <iostream>#include <iomanip> using namespace std;int main(){ int…
Q: Write a program that allows the user to input the r- and y-coordinates of two squares, and then…
A: Sample Response: #python function to check whether suqares are in a grid. If yes, then check whether…
Q: Write a program that will count the number of votes for each candidate, show the total number of…
A: Use an array to store the votes for each candidate and keep on voting till user wish to quit
Q: Write a program that takes in an integer in the range 11-100 as input. The output is a countdown…
A: Hi. There is a very small change required in the provided code. Let's fix it in the next step.
Q: Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D,…
A: Please find the answer below :
Q: Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D,…
A: ANS: I had written the code in C language: #include <stdio.h> int main(){ float a;…
Q: Write program in Java: Sites like Zillow get input about house prices from a database and provide…
A: PROGRAM: //Header file import java.util.Scanner; //Defining class public class LabProgram {…
Q: Write a program that will ask a user to input grades in Integral Calculus, Computer Programming and…
A: Given Code : integral_calc = float(input('Input your grade in Integral Calculus: '))phys =…
Q: Write a program to read two integers, then test if the two numbers are divisible by (5,6) at the…
A: Write a program to input two numbers and check if both are divisible by 5 and 6 at the same time
Q: Write a program that prompts the capacity, in gallons, of an automobile fuel tank and the miles per…
A: Note: In this question the coding language is not specified then we are doing this question in the…
Q: Write a program that prompts the user to enter an integer from 1 to 15 and displays a pyramid, as…
A: import java.util.*;import java.lang.*;import java.io.*; class Codechef{ public static void main…
Q: Write a program that asks users when their birthday is. Use information provided to give them their…
A: Your solution is here with an output.
Q: Suppose you save $100 each month into a savings account with the annual interest rate 5%. So, the…
A: Lets see the solution.
Q: Write a program that generates a plate number based on the user's answer to the following questions:…
A: PROGRAM EXPLANATION Include the header file. Define the main function. Create variables for input…
Q: Write a program that simulates the normal operation of a modern elevator with 25 floors (levels) and…
A: Algorithm: Start the program. Read the current floor from user. Read the option from user to move…
Q: Implement a program that calculates the bill of a sandwich stand. The program should ask the user to…
A: We need to write a program that calculates the bill of a sandwich stand. The program will ask the…
Q: Write a program that prints a custom conversion table from Celsius temperatures to Fahrenheit and…
A: Objective: This program converts a range of given temperature in Celcius to Fahrenheit and Newton…
Write a program that creates a login name for a user, given the user's first name, last name, and a four-digit integer as input. Output the login name, which is made up of the first five letters of the last name, followed by the first letter of the first name, and then the last two digits of the number (use the % operator). If the last name has less than five letters, then use all letters of the last name.
Hint: Use the to_string() function to convert numerical data to a string.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
- Solve in Python: Write a program that creates a login name for a user, given the user's first name, last name, and a four-digit integer as input. Output the login name, which is made up of the first five letters of the last name, followed by the first letter of the first name, and then the last two digits of the number (use the % operator). If the last name has less than five letters, then use all letters of the last name. Ex: If the input is: Michael Jordan 1991 the output is: Your login name: JordaM91 Ex: If the input is: Kanye West 2024 the output is: Your login name: WestK24Write a program in Java that creates a login name for a user, given the user's first name, last name, and a four-digit integer as input. Output the login name, which is made up of the first six letters of the first name, followed by the first letter of the last name, an underscore (_), and then the last digit of the number (use the % operator). If the first name has less than six letters, then use all letters of the first name. Ex: If the input is: Michael Jordan 1991 the output is: Your login name: MichaeJ_1 Ex: If the input is: Nicole Smith 2024 the output is: Your login name: NicoleS_4Write a program that prompts the user to enter a sequence of numbers until a -999 is entered. It will print the numbers the user entered, five number in a row,with a before the first number and after the last number in each row. For example, Enter a number (-999 to stop): 23Enter a number (-999 to stop): 15Enter a number (-999 to stop): 1Enter a number (-999 to stop): 7Enter a number (-999 to stop): 9Enter a number (-999 to stop): 21Enter a number (-999 to stop): 17Enter a number (-999 to stop): 33Enter a number (-999 to stop): -999[23 15.17 9] [21 17 33]
- write a program that displays, in ascending order,the first names of those students who have attended more than one day of the course.If there are students with the same first name, display their first and last names.Write a program that asks a user to enter a first name, a last name, and a year, andconstruct an account ID in the format of:firstname.lastnameYYwhere the field “firstname” is user’s first name allowing no more than (first) five letters;the field “lastname” is user’s last name allowing no more than (first) six letters; and thefiled “YY” is the lower two digits of the year. For example:first name entered: Michaellast name entered: Richmondyear entered: 1985 the constructed account ID will be: Micha.Richmo85Write a program that asks users when their birthday is. Use information provided to give them their astrological sign. Each of the twelve signs should display a different horoscope. Use the following dates for each sign, keeping in mind that both month and day must be evaluated for an accurate result. Aries: March 21–April 20 Taurus: April 21–May 21 Gemini: May 22–June 21 Cancer: June 22–July 22 Leo: July 23–August 22 Virgo: August 23–September 23 Libra: September 24–October 23 Scorpio: October 24–November 22 Sagittarius: November 23–December 21 Capricorn: December 22–January 20 Aquarius: January 21–February 19 Pisces: February 20–March 20
- In Java for zybooks ,Lab 3.27, Write a program that creates a login name for a user, given the user's first name, last name, and a four-digit integer as input. Output the login name, which is made up of the first six letters of the first name, followed by the first letter of the last name, an underscore (_), and then the last digit of the number (use the % operator). If the first name has less than six letters, then use all letters of the first name.Write a program that coverts a zip code to a bar code. The bar codes use large and small bars. We will use : as a small bar and | as a large bar. Each digit has its own bar pattern. 1 is :::|| 2 is ::|:| 3 is ::||: 4 is :|::| 5 is :|:|: 6 is :||:: 7 is |:::| 8 is |::|: 9 is |:|:: 0 is ||::: The barcode also includes a check digit. The final digit added to the bar code verifies the previous numbers are correct. To Determine the checksum: Add all the digits together Determine what needs to be added to make the total a multiple of 10 The bar code also always starts and ends with a large bar. This is used by the scanner to align the letter. Drexel's Zip Code is 19104 The check digit is 5. The sum of the digits is 1+9+1+0+4 = 15. To make 15 a multiple of 10, we need to add 5. The bar code will be |:::|||:|:::::||||::::|::|:|:|:| The majority of work in this problem is done by digit. It makes sense to store the zip code as a string, not as an integer. Write the function checksum(zip)…Write a program that coverts a zip code to a bar code. The bar codes use large and small bars. We will use : as a small bar and | as a large bar. Each digit has its own bar pattern. 1 is :::|| 2 is ::|:| 3 is ::||: 4 is :|::| 5 is :|:|: 6 is :||:: 7 is |:::| 8 is |::|: 9 is |:|:: 0 is ||::: The barcode also includes a check digit. The final digit added to the bar code verifies the previous numbers are correct. To Determine the checksum: Add all the digits together Determine what needs to be added to make the total a multiple of 10 The bar code also always starts and ends with a large bar. This is used by the scanner to align the letter. Drexel's Zip Code is 19104 The check digit is 5. The sum of the digits is 1+9+1+0+4 = 15. To make 15 a multiple of 10, we need to add 5. The bar code will be |:::|||:|:::::||||::::|::|:|:|:| The majority of work in this problem is done by digit. It makes sense to store the zip code as a string, not as an integer. Write the function checksum(zip)…
- Write a program that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If the score entered is less than 0 or more than 10, display Score must be between 10 and 0 and do not use the score. After all the scores have been entered, display the number of valid scores entered, the highest score, the lowest score, and the arithmetic averageWrite a program that reads the user's first name and last name, and then use them to create a UPM email for the user. If the total number of characters in the user's full name, (first name + last name), is less than 10 letters, you should use the full name to create the user’s email. The general format of the user’s email should look like this: firstName.lastName@upm.edu.sa For example: First name = Ali Last name = Omar Total number of letters in both first and last names = 7 letters (<10 letters) Output = omar.ali@upm.edu.sa If the number of characters in the user's full name, (first name + last name), is greater than or equal to 10 letters, you should only use the first character in the user’s first name, and the whole last name to create an email. For example: First name = Abdullah Last name = Omar Total number of letters in both first and last names = 12 letters (>=10 letters) Output = a.omar@upm.edu.sa Note: you can assume the user will always enter lowercase lettersin Java Write a program that establishes two savings accounts with saver1 having account number10002 with an initial balance of $2,000, and saver2 having account 10003 with an initialbalance of $3,000. Set a common rate of interest at 5% per year. At the end of each month,update the balance by adding one month’s interest to the balance, so that the balancecompounds monthly. Print an output that displays the month number and the account numberand the balance for each of the two accounts. Use month 0 to display the initial balances, month1 to display the balances after the first month’s interest, and so on. At the end of the year,display the total balance for both accounts combined, like this:Output:Monthly balances for one year with 0.05 annual interest:Month Account # Balance Account # Balance----- --------- ------- --------- ------- 0 10002 2000.00 10003 3000.00 1 10002 2008.33 10003 3012.50 2 10002 2016.70 10003 3025.05 3 10002 2025.10 10003 3037.66 4 10002 2033.54 10003 3050.31 5…