Concept explainers
Personal Web Page Generator
Write a
Enter your name: Julie Taylor [Enter]
Describe yourself: I am a computer science major, a member of the Jazz club, and I hope to work as a mobile app developer after I graduate.[Enter]
Once the user has entered the requested input, the program should create an HTML file, containing the input, for a simple Web page. Here is an example of the HTML content, using the sample input previously shown:
<html>
<head>
</head>
<body>
<center>
<h1>Julie Taylor</h1>
</center>
<hr />
I am a computer science major, a member of the Jazz club, and I hope to work as a mobile app developer after I graduate.
<hr />
</body>
</html>
Want to see the full answer?
Check out a sample textbook solutionChapter 4 Solutions
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Additional Engineering Textbook Solutions
Modern Database Management (12th Edition)
Starting Out with C++: Early Objects
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Starting Out with Python (4th Edition)
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Java: An Introduction to Problem Solving and Programming (8th Edition)
- (Mathematical functions) Write a program that calculates and displays values for y when y=xz/(xz) Your program should calculate y for values of x ranging between 1 and 5 and values of z ranging between 2 and 6. The x variable should control the outer loop and be incremented in steps of 1, and z should be incremented in steps of 1. Your program should also display the message Function Undefined when the x and z values are equal.arrow_forwardTranscribed Image Text Create a program that allows the user to do some basic functions. First, ask the user if they would like to find out sqrt, log or factorial of a number, then return the results. Here is the sample output: Welcome to the simple math helper. What would you like to calculate? 1. Sqrt 2. Log 3. Factorial > 1 Enter the number to sqrt: >9arrow_forward**using C# and Visual Studio design a program to satisfy the below problem** Create an application that generates a random number in the range of 1 through 100 and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display “Too high, try again.” If the user’s guess is lower than the random number, the program should display “Too low, try again.” If the user guesses the number, the application should congratulate the user and then generate a new random number so the game can start over. Optional Enhancement: Enhance the game so it keeps count of the number of guesses that the user makes. When the user correctly guesses the random number, the program should display the number of guesses.arrow_forward
- Time CalculatorWrite a program that asks the user to enter a number of seconds.-There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes and leftover seconds in that many seconds.-There are 3,600 seconds in an hour. If the number of seconds entered by the user is greater than or equal to 3,600, the program should display the number of hours, minutes, and leftover seconds in that many seconds.-There are 86,400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86,400, the program should display the number of days, hours, minutes, and leftover seconds in that many seconds.arrow_forward23. Personal Web Page GeneratorWrite a program that asks the user for his or her name, and then asks the user to enter a sentence that describes him or herself. Here is an example of the program’s screen: Enter your name: Julie Taylor [Enter] Describe yourself: I am a computer science major, a member of the Jazz club, and I hope to work as a mobile app developer after I graduate. [Enter]Once the user has entered the requested input, the program should create an HTML file, containing the input, for a simple Web page. Here is an example of the HTML content, using the sample input previously shown: <html><head></head><body> <center> <h1>Julie Taylor</h1> </center> <hr /> I am a computer science major, a member of the Jazz club, and I hope to work as a mobile app developer after I graduate. <hr /></body></html> 1. want to use condition loop to completearrow_forwardName Format - Use Javaarrow_forward
- Widgets and Gizmos An online retailer sells two products: widgets and gizmos. Each widget weighs 75 grams. Each gizmo weighs 112 grams. Write a program that reads the number of widgets and the number of gizmos in an order from the user. Then your program should compute and display the total weight of the order.arrow_forwardPython The month of February typically has28 days except when it is a leap year, in which case February has 29 days.Write a program that asks the user to enter a year. The program should then display the number of days in February that year. Use the following criteria to identify leap years: The program shall loop back to ask the user to enter another year. The program shall NOT display the original display message explaining what the program does If the user enters an invalid year, the program willdisplay an error message to the user and prompt for a year If the user enters 0 or hits return for the year, then the program terminatesarrow_forwardmystery_value = 5 #You may modify the lines of code above, but don't move them!#When you Submit your code, we'll change these lines to#assign different values to the variables. #Write a program that divides mystery_value by mystery_value#and prints the result. If that operation results in an#error, divide mystery_value by (mystery_value + 5) and then#print the result. If that still fails, multiply mystery_value#by 5 and print the result. You may assume one of those three#things will work.##You may not use any conditionals.# #Add your code here!arrow_forward
- An online book club awards points to its customers based on the number of books purchased each month. Points are awarded as follows: Books Purchased Points Earned 1 5 2 15 3 30 4 or more 60 Write a program that asks the user to enter the number of books purchased this month and then displays the number of points awarded.arrow_forwardC++ Visual Studio Modify the following program so it displays a menu allowing the user to select an addition, subtraction, multiplication, or division problem. The final selection on the menu should let the user quit the program. After the user has finished the math problem, the program should display the menu again. This process is repeated until the user chooses to quit the program. Input Validation: If the user selects an item not on the menu, display an error message and display the menu again. Code: #include <iostream>#include <cstdlib>#include <ctime>#include <conio.h> using namespace std; int main() {srand(static_cast<unsigned int>(time(nullptr))); while (true) {// Generate two random numbers.int num1 = rand() % 1000;int num2 = rand() % 1000; // Display the problem.cout << "Solve the following math problem:" << endl;cout << num1 << " + " << num2 << endl; // Wait for user input to reveal the answer.cout <<…arrow_forwardSentence Statistics Create a program that can tell a user how many times a particular character appears in text input. Your program will analyze the input, then prompt the user to enter characters to get stats. When the user types 'Q' the program will exit. Enter text input to analyze: The quick brown fox jumped over the lazy dog. What character do you want stats on? a The character a appears 1 times. What character do you want stats on? e The character e appears 4 times. What character do you want stats on? z The character z appears 1 times. What character do you want stats on? Q Goodbye! Analyzing the sentence We've provided starter code in main.cc to get input from the user. Now you need to analyze it. You can use a std::map to store information about each character and the number of times it appears in the input. A std::map maps keys of one type to values of another type. For this problem, you'll want to map from a letter to the number of times that letter appears. In C++, the char…arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,