Write a program that loops reading a word and displays a triangle of the word characters as shown
Q: Write a program that will print a rectangle outline. Read a height and width from the user and print…
A: #include<iostream>using namespace std;//method to print rectangle outline//takes height and…
Q: Write a program that would input the radius of a circle and output the area, circumference and…
A: As there is no programming language mentioned so program is attempted in python program…
Q: Write a program that rotates a Ellipse when the Rotate button is clicked, as shown in Figure 15.26b.
A: The objective is to write the program that rotates the given ellipse when the Rotate button is…
Q: Write a program that displays all the numbersfrom 100 to 1,000, ten per line, that are divisible by…
A: Declare the integer variables to hold the minimum and maximum values of the range, 100 and 1000.…
Q: Write a program that finds a number positive or
A: We need to read in a number and call the function to check a number is positive or not.
Q: Write a program that displays a random uppercase letter.
A: CODE: public class Main{ public static void main(String[] args) { char ch =(char)((int)'A'+…
Q: Write a program to read a sentence and replace lowercase characters by uppercase and vice-versa.
A: A character is said to be uppercase if it is in capital letter and it is said to be in lowercase if…
Q: Write a program to read the base and height of a triangle and display the area of the triangle (A =…
A: ` Actually, program is a executable software that runs on a computer.
Q: From 7/ Write two different programs to read a three-sided triangle and print "isosceles" when all…
A: CODE: #include <iostream> using namespace std; void get(int &a, int &b, int &c){…
Q: Write a program that displays the area and perimeter of a circle that has a radius of 6.5 using the…
A: Since programming language not mentioned, using python language.
Q: Write a program that will compute the area of a triangle
A: C program using height and base #include <stdio.h>#include <math.h>double…
Q: Write a program that reads the height h and radius r of Right Circular Cone and finds the surface…
A: Please find the answer below :
Q: Write a program that displays a random uppercase letter using the time.time() function.
A: Given: Write a program that displays a random uppercase letter using the time.time() function.…
Q: Create a program that prints a square with its sides using the symbol "*" and its inside using the…
A: Using the given requirements, a C++ program can be made with the help of “for loops” with two…
Q: Write a program that displays a Pascal triangle. The program prompts the user to enter the number of…
A: Given: please use java to answer the following question
Q: Write a program that prompts the user to enter theside of a hexagon and displays its area. The…
A: Making the given program in Python. Program Approach: Defining a main function within which…
Q: Write a program that prompts the user to enter the side of a hexagon and displays its area. The…
A: JAVA Code: import java.util.Scanner;import java.lang.Math; public class Main { public static…
Q: write a program that determines the type of triangle (scalene, isosceles, or equilateral)
A: Start input three sides according to condition print the type of triangle stop
Q: Write a program to compute the area of triangle.if the area is greater than 20,then display "special…
A: Output 1: Output 2:
Q: Write a program that asks the user to input the radius of a circle and calculates its area
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it in…
Q: Write a program to print Fibonacci series
A: The Fibonacci series is a set of numbers starting with one or zero, followed by one, and continuing…
Q: Write a program that displays allthe numbers from 100 to 200, ten per line, that are divisible by 3…
A: Let us consider a java program that displays all the numbers from 100 to 200 ten per line, that are…
Q: Write a program that converts distances measured in kilometers to miles.One kilometer is…
A: Kilometers must be entered by the user. The kilometres variable holds this value. Since 1 kilometre…
Q: Write a program that displays, ten numbers per line, all the numbers from 100 to 1,000 that are…
A: Program code: #declaring required variables num = 1 #for loop for i in range(100, 1001): #if…
Q: Write a program with loops that will draw a right triangle in the following shape. ** *** **** ** **
A: Given: Java
Q: Write a program to read the base and height of a triangle and display the area of the triangle A=…
A: Since the programming language is not mentioned in the question, we will answer this question in the…
Q: 4) Write a general program that takes x-y coordinates of a point in the cartesian plane and prints a…
A: The complete code is given below with the output.
Q: Create a program that reads two integers, a and b, from the user. Your program should compute and…
A: #asking user for inputa=int(input("Enter a number "))b=int(input("Enter a number "))#find…
Q: Write a Little Man program that accepts five random numbers from the user and displays them in…
A: Answer: import random number by using import module after that we sort them
Q: Write a program to compute the area of triangle and if the area is more than or equal to 20 then…
A: Program Approach - Define the function named main(). Declare the variables and initialize them as…
Q: Write a program that prompts the user to enter the three points (x1, y1), (x2, y2), and (x3, y3) of…
A: Python Code: # Enter three points for a trianglex1, y1, x2, y2, x3, y3 = eval(input( "Enter three…
Q: Write a program that reads a character and prints out whether it is a vowel or a consonant.
A: here No programming language is mentioned so i attempted this question in c language
Q: Write a program that identifies all the vowels in a word.
A: CODE IS: #include<bits/stdc++.h> using namespace std; void countVowels(const string…
Q: Create a program that asks the user to tell a story using input from the keyboard and print it Ask…
A: your question is about python programming. let's write the code for it
Q: Write a program to print a histogram of the lengths of words in its input. It is easy to draw the…
A: The histogram is a pictorial representation that indicates the frequency of specified ranges of…
Q: Write a C program to check whether a triangle is Equilateral, Isosceles or Scalene. a b c a = c 75…
A: #include <stdio.h>/*Equilateral : if all 3 sides in triangle are equal then it is Equilateral…
Q: Write a program that reads the full name of a student; and then prints it in the form: last first…
A: C++ Program: # include <iostream># include <string>using namespace std; int main(){…
Q: Write a program that computes for the circumference of a circle.
A: Given: Write a program that computes for the circumference of a circle. The program is written in C…
Q: Write a program that will read value of the radius to compute the Area and Perimeter of a Circle.…
A: Below is the program in C++
Q: write a program that asks the user to enter an angle in degrees and prints out the sine of that…
A: We need to write a program that takes input of an angle from user in degrees and print the sine of…
Q: A program for reading the number a and print: 1 if it is 1 = a, 2 if it is a = 2, 3 if it is a = 3
A: Since the programming language is not mentioned, I am using C++ programming language
Q: Write a program that prompts the user to enter an integer from 1 to 15 and displays a pyramid.
A: #include <iostream>#include <iomanip> int main(){ std::cout << "Enter the…
Q: Write a program that displays, ten per line, all the leap years in the twenty-first century (from…
A: Approaches: Define a main category. within the most category outline a main perform.Inside the most…
Q: Write a program that displays the area and perimeter of a circle that has a radius of 5.5 using the…
A: Note: Since you have not provided the language to write the code so I am using Java language to…
Q: Create C program that loops from 1 to 30 and prints out each value on a separate line, except print…
A: Please give positive ratings for my efforts. Thanks. PROGRAM #include <stdio.h> int main()…
Q: Write a program that displays the first and last words of a sentence input by the user. Assume that…
A: Question 1). Write a program that displays the first and last words of a sentence input by the user.…
Q: Write a program that calculates and prints the volume of a pyramid given the base (b) and the height…
A: Note: Below is the required program in the C++ language. Program Approach: Defining the necessary…
Q: Write a program that prompts for and reads the radius and the height of a cylinder (in centimeters).…
A: Programming instructions: Include necessary header files. In the main(), prompt the user to enter…
class string
{
public static void main(String[] args)
{
int i, j, n = 5;
for (i = 1; i <= n; i++)
{
for (j = 1; j <= i; j++)
{
System.out.printf("%c ", 'A' - 1 + i);
}
System.out.printf("\n");
}
}
}
Step by step
Solved in 2 steps
- lew AaBbCcDc AaBbCeDc AABBCCD AaBbC AaBbCcC Aa -*x, * A- .A-====- = I Normal 1 No Spac. 1 Sans int. Heading 1 Heading 2 Title Font Paragraph Styles Question 1 [15 pts]: Write a java program to help an employee calculate the price of a product after discount. Your program should ask the student to enter the product name, the original price and the discount value. Your program should calculate first the final price based on the following formulas: Final price = original price (original price discount / 100) Sample Runl: Enter product name: chocolate Enter original price and disCount: 90 20 Price after discount of chocclate: 725 Endisb UtedZOTcz/m/MjUyOTUxNjMwNjlx/details Share | Home Page Classroom 2 @Dr. Imad Qasim Exercise Wnite a program that asks the user to type the width and the height of a rectangle and then outputs to the screen the area and the perimeter of that rectangle.Course HTML Write a JavaScript function that accepts a number from a user as input and checks if the number is prime, then print True if the number is not a prime, print False.
- PYTHON CODE Reza Enterprises sells tickets for buses, tours, and other travel services. Because Reza frequently mistypes long ticket numbers, Reza Enterprises has asked his students to write an application that shows if a ticket is invalid. Your application/program tells the ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you lose the last digit of the number, then divide by 7, the remainder of the division is exactly the same to the last dropped digit. This process is shown below: Step 1: Enter the ticket number; for example 123454 Step 2: Remove the last digit, leaving 12345 Step 3: Determine the remainder when the ticket number from step 2 is divided by 7. In this case, 12345 divided by 7 leaves a remainder of 4. Step 4: Display a message to the ticket agent indicating whether the ticket number is valid or not. If the ticket number is valid, save the number to a .txt file called “tickets.txt” and continue to loop your program asking…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.def print_num_pattern(num1, num2): if num1 <=0: print("0", end="") return print(num1, end="") print_num_pattern(num1 - num2, num2) print(num1, end="") if __name__ == "__main__": num1 = int(input()) num2 = int(input()) print_num_pattern(num1, num2)
- Please provide answer in C#: Slot Machine Simulation A slot machine is a gambling device into which the user inserts money and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount of money that the slot machine dispenses back to the user. Create an application that simulates a slot machine. Figure 8-23 (on page 539 of your book) shows an example of how the form should look. The application should let the user enter into a TextBox the amount of money he or she is inserting into the machine. When the user clicks the Spin button, the application should display three randomly selected symbols. (Slot machines traditionally display fruit symbols. You will find a set of fruit symbols attached to this dropbox for your use - from the Student Sample Programs provided by the book author.) If none of the randomly displayed images match, the program should inform the user that he or she has won…File math.html contains a form that has to be processed with a PHP program that you will write. Perform the following tasks: 1. Show the name of your PHP program and your name in the form. 2. Replace the fixed + sign in the form with a textbox, so that the user can enter + or -. 3. Write and test a PHP program that will do the following: a. Validate that the operation in the textbox corresponds to the operation selected by the radio button in the operation radio button group. b. Validate that the operands are integers with values corresponding to the selection in the grade radio button group. c. Check that the result entered by the user is a correct integer. If so, send a message to the browser and ask for another submission of the form. If not, send to browser an error message and request resubmission of the form. d. Keep track of the number of correct and incorrect answers of the user during the session and include both in the messages that acknowledge a correct result or…Transcribed 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: >9
- Python Turtle Graphics Draw a spiral diagram using Python turtle package program follows 3 steps: Import the turtle module Create a turtle to control. Draw around using the turtle methods. You should consider the following points in your solution: The shapes should be drawn with the shown colors Yellow and white for the square-like shapes. Blue for the background. The prompt should have a turtle shape. The number of iterations should be 300 You should use only one loop. The number of the yellow color lines should be 200. The final shape of the output should be as shown in the picture attached. Make sure to set properly the starting position (x & y) of your drawing, to maintain the required diagram. video on youtube: https://www.youtube.com/watch?v=ZqoJD2RMu1IPYTHON: In this assignment, you will use all of the graphics commands you have learned to create an animated scene. Your program should have a clear theme and tell a story. You may pick any school-appropriate theme that you like. The program must include a minimum of: 5 circles 5 polygons 5 line commands 2 for loops 1 global variable You may wish to use the standard code for simplegui graphics below: import simplegui def draw_handler(canvas): frame = simplegui.create_frame('Testing', 600, 600) frame.set_canvas_background("Black") frame.set_draw_handler(draw_handler) frame.start()Pig Latin is a nonsense language. To create a word in pig Latin, you remove the first letter and then add the first letter and ay at the end of the word. For example, dog becomes ogday and cat becomes atcay. Write a program named PigLatin that allows the user to enter a word and displays the pig Latin version.