Q4 Based on Figure Q4, answer the following questions. This program draws a triangle on the screen My name is My matric no is |I want to print triangle so will select no 1 = 1 Please enter 'y' to continue : y Figure Q4
Q: PYTHON HOMEWORK QUESTION def area(side1, side2): return side1 * side2 s1 = 12 s2 = 6 Select…
A: Here, a function area is defined which is accepting 2 arguments and then returning the area by…
Q: One Computer Science program uses the following rules tor CS course placement: 1. if the CS AP score…
A: Objective: This program determines CS placement for students depending on certain given rules. The…
Q: Hide Assignment Information Instructions The civil engineering department has asked you to write a…
A: Import the math module. Define a function called sphere_volume with parameter radius. The function…
Q: Let A = {1, 2, 3, 4, 5, 6, 7} Let B = {3, 4, 5, 6, 7, 8, 9} Let X = 13 Let X=X+|An B| Let X=X+|A U…
A: ANSWER:- Introduction: This is question requirement is the mystery number According to your…
Q: Jsing a professional tool, create an algorithm to explain how you would solve this problem: A…
A: import java.util.Scanner; public class KboatGreatestNumber { public static void main(String…
Q: Golf scores record the number of strokes used to get the ball in the hole. The expected number of…
A: Step 1 : STARTStep 2 : declare all variablesStep 3 : input par and strokeStep 4 : using if else if…
Q: Write a program that asks the user to enter today’s sales for five stores. The program should…
A: Start Declare an array to store sales of 5 stores Input sales For each sale in array Divide sale by…
Q: R studio : profit margin for each month - equals to profit a after tax divided by revenue…
A: Below is the complete solution with explanation in detail for the given question about profit margin…
Q: For tax purposes an item may be depreciated over a period of several years, n. With the straight…
A: By using Visual Basic:
Q: get_column_choice(): this function will allow us to ask the players which pocket they want to grab…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Problem: A small company needs an interactive program to compute an employee’s paycheck. The…
A: C++ Programming which refers to the object oriented programming languages. C++ (or “C-plus-plus”)…
Q: : Find the even multiples of any number chosen by the user in a given range - the user should…
A: #!/bin/bash # Get number from the user to which the user wants to get even multiples read -p "Enter…
Q: All coding is done in Java. I am using IntelliJ Idea if it helps. 12. Bar Chart Write a program…
A: the answer is given below:-
Q: Substring: Complete the following code to check if str2 with length strlen2 is a substrir str1 with…
A: It is defined as a low-level programming language for a computer or other programmable device…
Q: companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers to…
A: the code is an given below : '
Q: Q4/ Ex: Design a program to calculate the area of the shaded part shown in the figure: the width of…
A: The code is provided below:
Q: P3 – Inverted Pyramid of Odd Numbers Write a program that prompts the user to enter an integer from…
A: 1. Prompt the user to enter the number of lines2. Read the input and store it in the variable…
Q: -Calculate and display: Calculate outer radius, inner radius, inner circumference, area enclosed by…
A: As no programming language is mention so i am using java to answer this question.
Q: Please draw the correct flowchart for this game ?
A: The flowchart is given below along with output of code
Q: Function Name: dominosTime() Parameters: N/A Returns: None Description: During the summer, you…
A: Python used to answer this question
Q: Girl Scout Troop 815 has 18 members. Write the pseudocode for a program in which the troop can enter…
A: The following the required pseudo code for display the total number of boxes sold and calculate…
Q: DropLowGrade() – allows a user to drop their lowest grade This function will determine the lowest…
A: Program: test1 = int(input("Enter grade 1: "))test2 = int(input("Enter grade 2: "))test3 =…
Q: 2) for both triangle and diamond, first display a triangle of requested size, and then if the choice…
A: #include <bits/stdc++.h> using namespace std; void instructions(){ cout<<"Firstly…
Q: Problem D: Different Dice Game Consider the following game for two players: The first player rolls a…
A: solution: Given, Different Dice Game Consider the following game for two players: The first…
Q: PYTHON programming solotion Develop a program that allows the user to enter a start value of 1 to…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT…
Q: 1: You are given a list of students’ names and their test scores. Design algorithm that does the…
A: 1) START 2)Read the number of students 3)Read the test scores of the students into the one array…
Q: Assignment Write a program that tracks how much steps the user walks in total in a day and reports…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: Periodic compounding The total accumulated value, including the principal sum P, is given by the…
A: The Python code is given below with output screenshot
Q: For this homework, we will be creating a simple program that will take in your basic information and…
A: Please find the answer below :
Q: C++ Using struct Trying to get a better understanding on how to layout each part. Write the…
A: //C++ Program #include <iostream>#include <string>using namespace std; struct userInfo{…
Q: Delegate methodology
A: Note: As per the guidelines can answer only the first three sections, please resubmit the question…
Q: Complete the following Incomplete LMC program by filling out the vacant mailboxes. The program…
A: Complete the following Incomplete LMC program by filling out the vacant mailboxes. The program…
Q: HW6_4: Write code to solve the following system of equations using the Newton-Raphson method. Let x…
A: function [x0,iter]=newton_Nonlinear_System(f,df,x0,tol,Max_iter)% INPUTS %f = vector of function…
Q: 3- Given S= 1 + 3! 5! ,correct the following program which describes the series S,. 7! 9! S=2; m=1;…
A: Error in the above program: Variable S's initial value should be 1 instead of 2. f = f*i will…
Q: ID: A 9. Directions: The question or incomplete statement below is followed by four suggested…
A: We have been given a question in which four statements are provided which result in correct form of…
Q: Home Buffet is trying to make a comeback. They want to offer special prices to the seniors an…
A: These question answer is as follows,
Q: Payment = months Principal [rate ((1 + rate)mo [(rate + 1)months – 1] - For the formula to compute…
A: The question is to write the JAVA code for the given question.
Q: 4-5 A Girl Scout needs to calculate the total dollar amount of her cookie orders. User input should…
A: Given :- 4-5 A Girl Scout needs to calculate the total dollar amount of her cookie orders. User…
Q: Task using C language Two spacecrafts are traveling at different speeds from Earth to Mars. While…
A: Dear Student, The source code, implementation and expected output of your question is given below -
Q: ING Chess Moves Mapper using Shortest path algorithm As the title indicates, you will need to…
A: It is defined as a interpreted, object-oriented, high-level programming language with dynamic…
Q: Customized step counter Learning Objectives In this lab, you will Create a function to match the…
A: here we are calculating the miles walked based on the number of steps given and the stretch of each…
Q: Write a program using Visual Basic that performs the following tasks: 1.1 Request a depreciation of…
A: Create a new visual basic project, place four labels, four text boxes, two buttons and one list box.…
Q: Unit 4 Debugging Exercises The following 2 debugging assignments begins with some comments…
A: Hey there, I am writing the required solution of the questin mentioned above. Please do find the…
Q: Q/ The following table shows the order of five students degrees in mathmetics , physics and english…
A: While doing programming in any programming language, you need to use various variables to store…
Q: Q/ The following table shows the order of five students degrees in mathmetics , physics and english…
A: While doing programming in any programming language, you need to use various variables to store…
Step by step
Solved in 2 steps with 2 images
- display_b bout BOOK Haven". The function should output the following details: Welcome message and store location List of available book genres (Fiction, Mystery, Science Fiction, Fantasy, Non-Fiction) Current promotion ("Buy 2, Get 1 Free on all paperback books!") Customer service information ("For any inquiries, reach out to our customer service at 1-800-987-6543.") Store hours for each day of the week Contact information with a dedicated support email (info@bookhaven.com) Call the function to display the information.Microwaves / Radio Waves If a scientist knows the wavelength of an electromagnetic wave she can determine what type of radiation it is. Write a program that asks for the wavelength in meters of an electromagnetic wave and then displays what that wave is according to the following chart. (For example, a wave with a wavelength of 1E-10 meters would be an X-ray.) 1x 10-11 1 x 10-8 4 x 10-7 7x 10-7 1x 10-3 1 x 10-2 Gamma Rays. X Rays Ultraviolet Visible Light InfraredIn cengage mindtap The credit plan at TidBit Computer Store specifies a 10% down payment and an annual interest rate of 12%. Monthly payments are 5% of the listed purchase price, minus the down payment. Write a program that takes the purchase price as input. The program should display a table, with appropriate headers, of a payment schedule for the lifetime of the loan. Each row of the table should contain the following items: The month number (beginning with 1) The current total balance owed The interest owed for that month The amount of principal owed for that month The payment for that month The balance remaining after payment The amount of interest for a month is equal to balance × rate / 12. The amount of principal for a month is equal to the monthly payment minus the interest owed.
- Q/3Design and Write VB program to classify students according to their high school average. The students with average greater than 90 should be added to list labeled “ Oil and Gas Engineering”, students with average more than 84 and less than 90 should be added to list labeled “ Chemical Engineering” and students with average more than 79 and less or equal 84 should be added to list labeled “ Polymer Engineering” ,How many total stars will be displayed by each of the following program segments? A) for (row = 0; row < 20; row++){ for (star = 0; star < 30; star++) { cout << '*';}cout << end1; }B) for (row = 0; row < 20; row ++) { for (star = 0; star < 30; star++) { if (star > 10)break; cout << '*'; }cout << end1; }Learning Objectives: Python Programming Use loop over a stringReplace characters within a stringFunction (declaration and call)Write code in modular formInstructions Create a function only_chars that takes the line of text and returns the text line excluding the spaces, periods, exclamation points, or commas. Create a program that will read the input line, use the function, and then print the line, without spaces, periods, exclamation marks, or commas and their length. Ex: If the input is: Listen, Mr. Jones, calm down. the output is: ListenMrJonescalmdown21Do not forget if __name__ == "__main__" section!
- PYTHON!!! The credit plan at TidBit Computer Store specifies a 10% down payment and an annual interest rate of 12%. Monthly payments are 5% of the listed purchase price, minus the down payment. Write a program that takes the purchase price as input. The program should display a table, with appropriate headers, of a payment schedule for the lifetime of the loan. Each row of the table should contain the following items: The month number (beginning with 1) The current total balance owed The interest owed for that month The amount of principal owed for that month The payment for that month The balance remaining after payment The amount of interest for a month is equal to balance × rate / 12. The amount of principal for a month is equal to the monthly payment minus the interest owed. An example of the program input and output is shown below: Enter the puchase price: 200 (SEE IMAGE FOR PURCHASE PRICE CHART) Results you should get: Input: 200 Output: Purchase price: 200…Sports exercise advisor algorithm. In this algorithm you will start out with a temperature value in Celsius, so you do not need to ask the user for it. First, convert the temperature to Fahrenheit. Then display a recommended sports exercise based on the Fahrenheit temperature as follows: for temperatures between 65 and 80° display tennis, for colder temperatures display ping pong, and for warmer temperatures display canoeing. thanks in advanceA O For the following Graph, which of the below statements is true? O C B E Select one: O a. Graph size is 6 and graph order is 5. D b. Graph size is 6 and graph order is 6. C. Graph size is 5 and graph order is 6. O d. Graph size is 5 and graph order is 5.
- 16 Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar. var num2 = 32; var num1 = 12; var rem=num2 % num1; while(rem> 0) { num2 = num1; num1 = rem; rem =num2 9% num1; document.write(num1): The output of the document.write statement at the end of this block is Reset Next m. All rights reserved. 5896The text presented the Sierpinski triangle fractal. Inthis exercise, you will write a program to display another fractal, called the Kochsnowflake, named after a famous Swedish mathematician. A Koch snowflake iscreated as follows:1. Begin with an equilateral triangle, which is considered to be the Koch fractalof order (or level) 0, as shown in Figure a.2. Divide each line in the shape into three equal line segments and draw an outwardequilateral triangle with the middle line segment as the base to create aKoch fractal of order 1, as shown in Figure b.3. Repeat Step 2 to create a Koch fractal of order 2, 3, . . . , and so on, as shownin Figures c and d.Slappy’s Software Sales AssignmentYou have been hired by Slappy’s Software Sales to write a program to figure thetotal cost to customers that order Slappy’s software packages.Discounts are given based on the number of units sold:Number of Units Sold Discount Amount1 – 9 None10 – 19 20%20 – 49 30%50 – 99 40%100 or more 50%Create a form similar to this:The three boxes are labels. Remember to use the Auto Size and Border Styleproperties.The program should read the number of units sold and figure a base cost. Theunits cost $99 each. A discount should then be figured and subtracted from thebase cost. The subtotal, discount amount and total cost should be displayed, ascurrency, in the appropriate labels.Here are some screen shots of the running program:Set the tab order and access keys.Put comments in your program as to what each section is doing.Use constants for the discount rates and base price.