Write a program using for loop that generates a multiplication table for any integer (given by the user) up to any multiple (also given by the user). Your output should be similar to what is given in the sample below. Sample Output >> exercisel9 Enter the number for which you want to create the multiplication table: 91 Enter the number up to which multiplication table is required: 5 91 X 1 91 91 X 2 182 91 X 3 - 273 91 X 4- 364 91 X 5 - 455 >>
Q: in Computer Science
A: According to the question we need to answer: What is the best way to take notes in Computer Scienc...
Q: Q-1. What is at put gf thie logic gatu? F=?
A: AND gate: OR gate:
Q: The usage of lists in functional programming languages is quite widespread. Why is this?
A: The usage of lists in functional programming languages is quite widespread. Why is this?
Q: 6. Write function main to do the following a. Declare four integers that will represent the four pro...
A: import java.util.LinkedList;public class Threadexample { public static void main(String[] args)throw...
Q: Given a list of n positive integers, show that there must two of these integers whose difference is ...
A: As per the code asked, from a list of n positive integers, show that there must two of these integer...
Q: For what reason is it necessary for the symbol or name used in the C++ inclusion guard on a library ...
A: Introduction : The symbol / name used in the c++ inclusion guard on a library interface file must be...
Q: Unlike most other PC operating systems, the Mac OS stores a large portion of the operating system in...
A: The answer is given in the below step
Q: Select for what applies to the following Power off - Sleep Restart Hibernate Power on Designed for n...
A: here we have given the options for the given queries, you can find them in step 2.
Q: Without a seed value specified, what does a Random object use as a seed value
A: Random Number Seed Random numbers are helpful in a variety of situations where it is necessary to cr...
Q: One of the following tuples not exist in a * :CFG set of variables final symbol O start symbols O pr...
A: One of the following tuples that does not exist in CFG is Final Symbol Existing tuples are set of...
Q: A cut-and-paste procedure used to take minutes instead of seconds on early Mac OS releases. What new...
A: Cut and paste operation is a heavy task.
Q: In the following instruction sequence, select the values of the Carry, Zero and Sign flags where ind...
A: (a) CF=0, ZF=0, SF=0(b) CF=1, ZF=0, SF=1
Q: In a database, describe the representations of Identifying Relationships, Non-Identifying Relationsh...
A: INTRODUCTION: Database: It is a collection of data that has been organized for ease of access, manag...
Q: I want to see if the tree has any upright nodes. Which means if the parents value is smaller than th...
A: public class Main{ // node class static class Node{ int data; Node left; Node right; Node(){ t...
Q: Create a case problem with the application of liner programming distribution models (assignment prob...
A: Task : Formulate the sample LLP problem. Define : 1.Decision variable 2. Objective function 3. Con...
Q: 13. Suppose you received these bit strings over a communi- cations link, where the last bit is a par...
A: Solution:-
Q: Statisticians use the concepts of mean and standard deviation to describe a collection of numbers. T...
A: Code :num_scores = int(input('Number of scores: ')) print('Enter',num_scores,'scores:') scores = [] ...
Q: An acronym is a word formed from the initial letters of words in a s an acronym of the input. Append...
A: In this question, we are asked to write a python code as given . Explained with comments
Q: The following table provides all the colours in an image and the probability of occurrence of each o...
A: Here , i have prepared written solution as follows:
Q: Lagrange Interpolalion Please write cede any example with singly linkedlist methed by using struct a...
A:
Q: 3) What is the space complexity of the memoized dynamic programming algorithm f computing the nth Fi...
A: The nth Fibonacci number is the sum of the (n-1)th and the (n-2)th. In the Fibonacci series each ter...
Q: ies and its corresponding amount in descending order (highest amount first) and the total amount spe...
A: given - Monthly Household Expense – Create arrays (size 15) that will hold the following information...
Q: To be able to use an I/O peripheral device, you need to put the address first in ... Select one: О а...
A: Memory address registers(MAR) is connected to the address lines of the system bus and specifies the ...
Q: Explain how to use the DiskPart program.
A: Introduction: It is necessary to open the command window to utilize Disk Part. We'll go through two ...
Q: What is the difference between the final, static, public, and private keywords?
A: Step 1) Final keyword Final keyword is one of the reserved keyword in java. It is mainly use to res...
Q: Write a Review of Related Studies (with citations) for the research topic "Relationships between Jo...
A: The way we work, live, and play has been altered by communication and information technology (ICT). ...
Q: describe and sketch an interface for a digital wearable device [that is not on the eyes or wrist]. S...
A: Wearable technologies, known mostly just as “wearables,” are electronic devices that are physically ...
Q: Why are disk files fragmented and distributed across the disk surface(s)?
A: Introduction: Disk fragmentation happens when data or fragments of files get dispersed over your har...
Q: Create a form having one textbox and a submit button. The user must be able to enter his age. Using ...
A: Solution: PHP is used to process form data and validate age. HTML is used to design form. Store thi...
Q: In this article, I will discuss the current usage of computers in Kenyan health care.
A: Introduction: TODAY'S COMPUTER USE IN HEALTH CARE IN KENYA -Computers assist in keeping track of a p...
Q: What is a conformant array, and how does it work?
A: Given To know about the conformant array.
Q: When should you use Power Pivot? When you want to clean, shape and transform data When you need to c...
A:
Q: What does SLA management entail?
A: The SLA is also known as Service Level Manager.
Q: Examples of software that has been utilized in the field of Agricultural Engineering are listed belo...
A: Agricultural Engineering is a field of study that applies engineering ideas and design to agricultur...
Q: List four different types of external disk interfaces.
A: Introduction: In general, hard disc interfaces are classified as follows: parallel ATA (PATA, also k...
Q: ines proces
A: given - Which Microcontroller category defines processing speed, and then explains and clarifies whi...
Q: What exactly is a data race?
A: Introduction: A data race happens when two or more threads in the same process simultaneously visit ...
Q: n Nasm assembly language, how can i create a function to exit a program anytime by a use
A: Utilize the END guidance to end the gathering of a program. You can likewise supply a location in th...
Q: which of the following words represent * :palindromes word NOSPACEECAPSON abab NOMELON 123123
A: According to the information given:- We have to choose the correct option.to satisfy the statement....
Q: JAVA PROGRAMMING: Lesson – Overloading Constructors 1. a .Create a class named Circle with fields n...
A: As per our guidelines, we are supposed to answer only one question. Kindly repost the remaining ques...
Q: Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Follow each...
A: Step 1 : Start Step 2 : Take input for the userNum from the user using the scanner object. Step 3 : ...
Q: Implement a Python program that solves N-Queens problem that retrieves a natural number n as an inpu...
A: Python program to solve the given problem is below.
Q: What are the many sorts of digital forensics tools available to you? List some pros and downsides of...
A: Introduction: "Live analysis" was standard in the 1980s, when digital forensics investigations were ...
Q: Function mergesort of type int listint list that sorts the given list of integers using the merge-so...
A: C++ Program: #include<bits/stdc++.h>using namespace std; /* Function List of type int that sor...
Q: In what ways may we as programmers be defensive, and what are some examples of defensive programming...
A: Defensive programming:- Defensive programming is a kind of "defensive design" that aims to guarantee...
Q: Find out the value of R7 P[i] is a price of item whose lenght is i meters and array of prices Array ...
A:
Q: If you want to provide Power BI Services on your own, "in-house" server, which Power BI product shou...
A: Power BI Report Server is an on-premises report server that includes the web site for viewing and ma...
Q: What are the approaches of software design and development?
A: Introduction : The following are the components of the programming design: Comprehend the programmer...
Q: Define online transaction processing (OLTP).
A: Introduction: An operating system is a software program that connects a computer's user to its hardw...
Q: Use the def keyword to create a funtion that will say. "Have a nice day!" You can name the function ...
A: We will see the above queries in python using Visual Studio Code : Code: def naming(name): ...
Step by step
Solved in 3 steps with 1 images
- 2. Write a program that uses a while loop to play a number guessing game. The computer should pick a number using random number generation and then continue asking the user to guess the number until they get it right. For each, gues, the computer should tell the user if the guess is too high or too low or is correct. 3. Using nested for loops, right a program that displays a bar chart (using asterisks) for a number entered by the user. For example, if the user enters 4, the bar chart looks like this:3. Task 2: Using for loop Write a for loop to print out the number set for odd and even numbers. NOTE:The program will accept range value to display the list of odd and even numbers. NOTE:Your source code must display any of the given sample output below.It means your source code should be flexible enough to meet any of the given sample output.Your source code output must be identical to any of the given sample output.It means you have to strictly follow what are the displayed text, labels, casing of characters in the sample output. OUTPUT 1 Enter Value: 10 Even: 2 4 6 8 10 Odd: 1 3 5 7 9 OUTPUT 2 Enter Value: 20 Even: 2 4 6 8 10 12 14 16 18 20 Odd: 1 3 5 7 9 11 13 15 17 19In this lab, you write a while loop that uses a sentinel value to control a loop in a Python program. You also write the statements that make up the body of the loop. The source code file already contains the necessary assignment and output statements. Each theater patron enters a value from 0 to 4 indicating the number of stars that the patron awards to the Guide’s featured movie of the week. The program executes continuously until the theater manager enters a negative number to quit. At the end of the program, you should display the average star rating for the movie. Instructions Make sure the file MovieGuide.pyis selected and open. Write thewhile loop using a sentinel value to control the loop, and also write the statements that make up the body of the loop. Execute the program by clicking the Run button at the bottom of the screen. Input the following as star ratings: 0, 3, 4, 4, 1, 1, 2, -1 Ensure that the average output is correct.
- In this lab, you write a while loop that uses a sentinel value to control a loop in a Python program. You also write the statements that make up the body of the loop. The source code file already contains the necessary assignment and output statements. Each theater patron enters a value from 0 to 4 indicating the number of stars that the patron awards to the Guide’s featured movie of the week. The program executes continuously until the theater manager enters a negative number to quit. At the end of the program, you should display the average star rating for the movie.Write code that uses any type of loop. The code should continually ask for a user input and sums all user inputs that are divisible by 2. The loop should continue until the user enters a negative number. The code should output the sum a single time once user entry has completed. You may assume all libraries and namespaces have been previously written into the code, you are just writing everything that would go inside the main function (beyond the return 0:).2. Write a while loop program that accepts numbers, then identify which of the numbers entered is the highest and the lowest and get the sum of all numbers. The user should input the count of numbers to be entered. Sample Output: Enter the count of numbers to be entered: 5 5 8. The highest number is: 9 3 The lowest number is : 3 9. The sum of all numbers is: 31 6 3. Write a program that accepts two input numbers and compute the Greatest Common Divisor using do-while To get the GCD of another input number, type Y or y; otherwise, type N or n to quit the program. Sample Output: Enter the value of the first number: 10 Enter the value of the second number: The Greatest Common Divisor of 10 and 6 is 2 Type Y/y if you want to try again. Type N/n to exit. :
- //for loop practice/*create a program, called aveRaceTime.cpp, for runners that wish to know their average race time.ask the user how many races they ran, and use their input in your for loop,for the limit on the number of loops (for example, if the user inputs three,that means your for loop should run three times.) Each time the loop runs, itwill ask the user what their race time was in minutes. Keep a running total ofall of the race times added together. After the loop, compute the user's average racetime, and display it in a sentence. Format the average time so it always shows two decimal points.Python Write a programmed that displays how population increases over time. Your program should ask the user to enter the starting population, a yearly increase, and many years to predict over. The program will display results in a neatly formatted table. When generating the table, you must use a loop of some sort to output the table.NOTE: When using a percentage value for each year, the population growth will not always yield a whole number.Therefore, your program should round to the nearest whole number since we cannot have a partial person.main.c + c Test Cases Executions 3. Negative Fusion by CodeChum Admin 1 E Run Tests As l've said before, there are three types of numbers: the positive, the zero, and the negative ones. Today, we shall pay attention only to the negative ones now. Make a loop that will accept O Test Case 1 random decimal/float numbers. When the user Your Output inputs 0, the loop will terminate and then output No Output the sum of all negative numbers inputted in 3 decimal places. Expected Output Let's code this. Enter a number: 2.4434 Enter a number: -1.3433 Input Enter a number: -2.444 Enter a number: 6.432 1. A series of decimal numbers Enter a number: 0 Sum of all negatives = -3.787 Output The first lines will contain message prompts to input the decimal numbers. The last line contains the sum of all negative numbers with 3 decimal places. O Test Case 2
- Program51.java Write a program that uses a while loop to generate 49 random integers, all from 20 to 49, inclusive. The same loop should print the integers in seven rows and right-aligned in columns seven characters wide. The program should report both the count and the total of integers in the 20s, 30s, and 40s. See Sample Output.Sample Output (IMAGE BELOW) Program52.java Write a program that prompts the user for a binary number (from 3 to 8 bits) as a String and converts it to base-10 decimal value. There are several ways to do this in Java but your program must use a for loop and first principles to perform the conversion. Print the base-10 number when the loop ends.Program53.java Write a program that uses a for loop to print a table of the square roots, squares, cubes, and cube roots of the integers from 5 to 15, inclusive...five columns in all. Values in both roots columns should display in columns 9 characters wide with 5 decimals. All other columns should display in columns 7…Write a program that calculates the balance of a savings account at the end of a period of time. It should ask the user for the annual interest rate, the starting balance, and the number of months that have passed since the account was established. A loop should then iterate once for every month, performing the following: A) Ask the user for the amount deposited into the account during the month. (Do not accept negative numbers.) This amount should be added to the balance. B) Ask the user for the amount withdrawn from the account during the month. (Do not accept negative numbers.) This amount should be subtracted from the balance. C) Calculate the monthly interest. The monthly interest rate is the annual interest rate divided by twelve. Multiply the monthly interest rate by the balance, and add the result to the balance. After the last iteration, the program should display the ending balance, the total amount of deposits, the total amount of withdrawals, and the total interest earned.python Write a program that runs like a cashier in a store. The program should use a while loop and prompt for the quantity and unit price of each item being purchased. The number of different items cannot be known in advance so the loop should continue until zero is entered for the quantity. A subtotal should be printed after each item's data has been rung up. See Sample Output. When the loop ends the program should report the number of different itemspurchased and the total amount due. SAMPLE OUTPUT: Enter item quantity or zero to quit 2 Enter unit price of item 2.50 Subtotal is $5.00 Enter item quantity or zero to quit 1 Enter unit price of item 7.99 Subtotal is $7.99 Enter item quantity or zero to quit 3 Enter unit price of item 2.39 Subtotal is $7.17 Enter item quantity or zero to quit 0 You purchased 3 different items Please pay $20.16