Q4: Your program allows users to enter an integer number n. The system displays an inverted right triangle with the height = n. Below is an example of how the program will run: OUTPUT: ***** **** *** ** Press any key to continue .
Q: Q1:\Write a program to check the temperature of a person and print the status in textbox.…
A: Form Design and Code Result:
Q: C cl *** clev ***** clevel clevela clevelan cleveland
A: Take string input from user. Run row loop till the length of the input string. Run column loop for…
Q: "C" when F 77. Private Sub Command1_Click() Dim C, F As Double C = InputBox("C") F = (9 * C/ 5) + 32…
A: The if else syntax in Visual Basic is as follows If condition Then statement(s) ElseIf condition…
Q: Reza Enterprises sells tickets for buses, tours, and other travel services. Because Reza frequently…
A: Algorithm: Start READ Num Compute: lastDigit = Num % 10 Compute: modNum = Num / 10 IF modNum% ==…
Q: Write a statement that produces a random number between 1 and 100 and stores it in the variable…
A: import random luckyNumber = random.randint(1,100)
Q: Your program allows users to enter 5 float numbers. The system displays the entered numbers in…
A: Here I have created an array of float types with sizes of 5. Next, I have taken input from the user…
Q: This method will return a string that when printed out will display a triangle. Each row of the…
A: The below code is fully functional and is written keeping in mind the requirements mentioned in the…
Q: Write an expression that obtains a random integer between 34 and 55. Write an expression that…
A: To get a random number we will use rand() in c++, also we are going seed time as a parameter to…
Q: When traveling through a gas, the speed of sound depends primarily on the density of the medium. The…
A: Given: When traveling through a gas, the speed of sound depends primarily on the density of the…
Q: The formulas for calculating BMI are B M I = 703 ⋅ w e i g h t I n P o u n d s/ h e i g h t I n I n…
A: Program code #1:
Q: Create a VB.NET Console Application that uses the While loop to display all leap years between 2010…
A: Actually, program is an executable software that runs on a computer.
Q: 6- Generates a random number between 1 and 10, Asks the user to guess the number and prints a…
A: Given:
Q: The screen size of a TV is given by the length of the rectangular diagonal. Traditional TVs come in…
A: code: #include<iostream> using namespace std; int main() { double…
Q: Write an application that inputs three integers from the user and displays the sum, average,…
A: You didn't mention any programming language, hence according to Bartleby policy, I have answered in…
Q: What is the output of the following code? Dim strPhrase As String strPhrase = "Shut the front door…
A: The given code is visual basic code where the string is defined in 2nd line. The requirement is to…
Q: Complete the code that returns the value of f(x), which has the value 1 inside the range -1 <x<1…
A: def function_f(x): #Code will be added here return fval
Q: Below is a nested loop containing an assignment statement. How many times will the assignment…
A: int z; for (int x = 1; x <= n; x++) { for (int y = 1; y <=…
Q: Create a VB.NET Console Application that uses the While loop to display all leap years between 2010…
A: Algorithm: 1. Start 2. Initilaize y to 2010 3. Using while loop traverse from 2010 to 2050 4. Inside…
Q: ((PYTHON)) Q1- Ask the user to write a number 8 times. Find the sum and the average of all those…
A: Hi, as there are multiple questions in this post, as per our policy, I'll answer the first question…
Q: Complete the program below, so it works. User enters amount to invest, interest percentage and…
A: This question explains about C# Program
Q: ecks whether the point is within the circle centered at (0, 0) with radius 10. For example, (4, 5)…
A: Given:
Q: The do-while statement below lets the user input an integer number multiple times as long as the…
A: Given:
Q: Create a VB.NET Console Application that uses the While loop to display all leap years between 2010…
A: Visual Basic .NET is a multi-paradigm, object-oriented programming language, implemented on the .NET…
Q: 1. Write a program that prints your full name. Write a program that prints your full name using…
A: 1.) #include <iostream> using namespace std; int main(){string name;cout<<"Write your…
Q: Write a code that asks the user to enter several numbers that are a multiple of 5. If the user…
A: I give the code in Python because no language is mentioned along with output and code screenshot
Q: Write a statement that assigns cell_count with cellLcount multiplied by 10. * performs…
A: Code cell_count=int(input())cell_count=cell_count*10;print(cell_count)
Q: Prompt for the user to enter their name. Print out their name forwards, backwards,…
A: Solution: Java code Main.java import java.util.Scanner; public class Main{ public static void…
Q: Write a program that will ask the user to enter 10 numbers and display the largest number entered.…
A: Note - As per our guidelines, we can provide solution only for one question. Since you have asked…
Q: Create a program that reads integers from the user until the enter key is pressed. Once all of the…
A: since programming language is not mentioned, I am attempting this in python, if you need it in any…
Q: Write a code snippet that reads a number and displays the square, cube, and fourth power with the…
A: As the question has asked about the math. Pow method, I have used Java program which has the math…
Q: Prompt the user to enter a string and then check whether that string starts with "U301-" or not. If…
A: Since the programming language is not mentioned so I have used the Python language. Write a Python…
Q: If you run this piece of code, you will get an error. Why? a = [0 1 2 3 4 5 6 7]; a = a^2; ro
A:
Q: Write Psuedo-code of an algorithm that will repeatedly ask the user to enter a number 10 times. If…
A: Psuedo code is step by step written outline that can be easily translated into the program.
Q: Write an application that allows a user to enter any number of student quiz scores, as integers,…
A: import java.util.Scanner; import java.util.*; import java.util.Collections; class Main { public…
Q: The do-while statement below lets the user input an integer number multiple times as long as the…
A: In this question, we are asked about the value of integer number for that given while loop must be…
Q: 6. Prompt user to enter an integer number from console. Adjust this number if it is not in the…
A: Below is the complete solution with explanation for the given question in detail.
Q: In visual studio please answer For 1-4, Using a For…Next, Do While, or Do Until Loops, create the…
A:
Q: Using Flowgorithm, create an application that reads two integers, determines whether the first is a…
A: To write an algorithm and draw a flowchart for reading two numbers, determines whether the first is…
Q: Create a change-counting game that gets the user to enter the number of coins required to make…
A: Since you are not mentioning the programming language, here we are using C++ to complete the…
Q: ShowCurrentTime.py, gives a program that displays the current time in GMT. Revise the program so…
A: Code to copy:- import time print("This Program Displays The Time In The Specified Time…
Q: How many times the statement print gets executed in the following a Igorithm? set x=2 while (x<6)…
A: this code will print "test" four times because the loop will start from 2 and go till 5.
Q: **3.22 (Geometry: point in a circle?) Write a program that prompts the user to enter a point ( x, y…
A: The given problem is to find the position of a point in x,y cordinate on x-y axis and find whether…
Q: What should be printed on screen? int main() int x = 5; if(x++ == 5) cout<<"Five"<<endl; else if(++x…
A: The output of the given C++ code is: Five Therefore, the correct option is D. Five.
Q: Write a program that asks the user to enter two integers: n1 and n2 and prints the sum of all…
A: Given: Write a program that asks the user to enter two integers: n1 and n2 and prints the sum of all…
Q: 5. Write the pseudocode that performs the following: Ask a user to enter a number. If the number is…
A: Required:
Q: The program segment has errors. Find as many as you can. // This code should display the sum of two…
A: There are two mistake in the code semi-Colum is missed after the while condition then condition in…
Q: (Display Magic Numbers) Display the first N magic numbers, where N is a positive number that the…
A: Mathematical calculations are done in C++ using arithmetic operators, such as +, -, /, * for…
Q: How many times will the computer display the message box in the code below? intCounter = 0 Do…
A: In this question we have to find out from the looping program that the computer will display the…
Q: If you execute the following code, what will it display if the user enters 5? 15? 30? −1? int…
A: GIVEN: If you execute the following code, what will it display if the user enters 5? 15? 30? −1? int…
Step by step
Solved in 3 steps with 2 images
- (Geometry: point in a circle?) Write a program that prompts the user to enter apoint (x, y) and checks whether the point is within the circle centered at (0, 0) withradius 10. For example, (4, 5) is inside the circle and (9, 9) is outside the circle, asshown in Figure 3.7a.(Hint: A point is in the circle if its distance to (0, 0) is less than or equal to 10.The formula for computing the distance is 2(x2 - x1)2 + (y2 - y1)2. Test yourprogram to cover all cases.) Two sample runs are shown below: Enter a point with two coordinates: 4 5Point (4.0, 5.0) is in the circleEnter a point with two coordinates: 9 9Point (9.0, 9.0) is not in the circleQ1: (Palindrome number) Write a program that prompts the user to enter a three-digit integer and determines whether it is a palindrome number. A number is palindrome if it reads the same from right to left and from left to right. Here is a sample run of this program: Enter a three-digit integer: 121 121 is a palindrome Enter a three-digit integer: 123 123 not a palindromeC# (Guess the Number Game) Write a program that plays “guess the number” as follows: Your program chooses the number to be guessed by selecting an int at random in the range 1–1000. The program then displays the following text in a label: A TextBox should be used to input the guess. As each guess is input, the background color should change to red or blue. Red indicates that the user is getting “warmer,” blue that the user is getting “colder.” A Label should display either “Too High” or “Too Low,” to help the user zero in on the correct answer. When the user guesses the correct answer, display “Correct!” in a message box, change the Form’s background color to green and disable the TextBox. Recall that a TextBox (like other controls) can be disabled by setting the control’s Enabled property to false. Provide a Button that allows the user to play the game again. When the Button is clicked, generate a new random number, change the background to the default color and enable the TextBox.
- ((PYTHON)) Q1- Ask the user to write a number 8 times. Find the sum and the average of all those numbers then display for the user the answer of both the sum and the average. Q2- Ask the user to guess what your favorite color is. If he does not answer correctly, ask him if he wants to try again. If he does not want to try again, display for him the correct answer.Complete the loop so that it displays all mountains that are over 15000 feet. The blank ____ on the code below indicates where your statement will be placed. var mountains = ["Mount Everest" : 29029, "Nanga Parbat" : 26660, "Kanlaon" : 8087, "Pico de Orizaba" : 18491, "Sabalan" : 15784]for ____ { if elevation > 15000 { print("\(mountain): \(elevation) feet.") } }(Display Magic Numbers) Display the first N magic numbers, where N is a positive number that the user provides as input. Here, a magic number is a number whose sum of its digits eventually leads to 1. For example, 1234 is a magic number because 1 + 2 + 3 + 4 = 10 and 1 + 0 = 1, while 1235 is not (1 + 2 + 3 + 5 = 11 and 1 + 1 = 2). Write a program that prints out the first N magic numbers, seven on each line. Here is the sample output: You are required to use the following function prototype: bool isMagic(int value); // Returns true if value is a magic number The outline of this function will be as follows: Step 1: Calculate the sum of digits of value Step 2: Repeat Step 1 until we get a single digit Step 3: If the resulting sum is equal to 1 then it is a magic number, otherwise not
- Lab #3 – Day CalculationBackground - Many times one needs to do calculations on dates. Programs like Excel use the number of days since 1/1/1970 when doing these calculations. We don't know enough C++ to completely do this calculation, yet, but we can make a start.Problem - You will prompt a user for a month, a day and a year. You will then tell the user how many days since January 1 of that year the input date is.For example if the user inputs a 3 for the month, a 2 for the day, and 2000 for the year the program outputs the number of days as being 62. Note 2000 is a leap year. Therefore you must test to see if a year is a leap year when doing this problem.The three rules which the Gregorian calendar uses to determine leap year are as follows:1. Years divisible by four are leap years, unless...2. Years also divisible by 100 are not leap years, except...**3. Years divisible by 400 are leap years. **** Combining rules 2 & 3: Centennial years that are not divisible by 400 are not leap…Write an expression that obtains a random integer between 34 and 55. Write an expression that obtains a random integer between 0 and 999. Write an expression that obtains a random number between 5.5 and 55.5.Computer Science PYTHON PROGRAMMING Write a program 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 randomly generated number, the program should display "Too high, try again." If the user's guess is lower, the program prints "Too low, try again." If the user guesses the number, the application should congratulate the user and generate a new random number so the game can start over. Keep track of the number of guesses a user makes before guessing the correct one and display it with the congratulatory message when the user guesses the number correctly. For this assignment, create functions that: generate and return a random number between 1 and 100. format and return the failure and congratulatory messages. Put these function in a module called helper.py and put the rest of the code in game.py. The game module must import the helper module. Please provide both helper.py & game.py…
- LargeSmall.py - This program calculates the largest and smallest of three integer values. # Declare and initialize variables here largest = None smallest = None # Prompt the user to enter 3 integer values # Write assignments, and necessary if else statements here as appropriate # Output largest and smallest number. print("The largest value is " + str(largest)) print("The smallest value is " + str(smallest))The formulas for calculating BMI are B M I = 703 ⋅ w e i g h t I n P o u n d s/ h e i g h t I n I n c h e s 2 or B M I = w e i g h t I n K i l o g r a m s /h e i g h t I n M e t e r s 2 Create a BMI calculator that reads the user’s weight and height (providing an option for the user to select which formula to use), and then calculates and displays the user’s body mass index. Also, display the BMI categories and their values from the National Heart Lung and Blood Institute: http://www.nhlbi.nih.gov/health/educational/lose_wt/BMI/bmicalc.htm (Links to an external site.) so the user can evaluate his/her BMI.Write an application that asks a user to enter an integer. Display a statement that indicates whether the integer is even or odd.