Exercise 4: Write a Python program that displays the times table of a given number. The program asks the user to enter two numbers n and m, then your program should display the product of the number n by 1, 2, 3, .until m. Note that your program should display a suitable error message if n or m entered as zero or a negative number. m nxm ==== 1 2 14 3 21 4 28 5 35 Figure 5. Exercise 5 Sample Run for n=7 and m=5. CINN777
Q: Write a Python Program that reads 4 numbers from the keyboard and finds the mean and standard…
A: Solution: Given: A program that reads 4 numbers from the keyboard and finds the mean and standard…
Q: Blissful number: a number where every digit is greater than its immediate left digit is called a…
A: Let's understand step by step : 1. Take input of number in a variable n. 2. Store n in another…
Q: This is a segment of program, when it executed with multiple values for n and s the program displays…
A: Given code: #include <iostream> using namespace std; int main(){ int x, y; int f;…
Q: Q7: Code a complete Python program that performs the following operations by reading the weight of…
A: # maintain a flag if user enter 0 then value of flag is changed to 0 and loop exit flag = 1# created…
Q: QUESTION#5: Write a program that inputs a sequence of non-negative numbers terminated by a negative…
A: Declare an array to store the given input Append the negative number at the end of each list Compute…
Q: input the source code (code1)to the program below(code 2), make sure the program can run with these…
A: The code has been placed at its required place.
Q: Design a program that will display an inches –to-centimeters conversion table. The smallest and…
A: Declare two variables for the smallest and the largest value for the inch. Declare a variable to…
Q: 8. Write a program to input 5 numbers from keyboard and find their sum and average. The program…
A: The answer to the given question is in subsequent steps.
Q: Python program that prints a multiplication table for numbers 2 to 12. (You may in this case use…
A: Please find the answer below
Q: Smaller number comes first. Create a python program that asks for two numbers. If the first one is…
A: The program is written in Python. Check the program screenshot for the correct indentation. Please…
Q: 3. Write a program that accepts two input numbers and compute the Greatest Common Divisor using…
A: #include <iostream>using namespace std; int main(){ char ch; int n1, n2; do {…
Q: Write a python program that takes pin code(5674,8756,9889,2342) and balance of a user’s account as…
A: Below is the required java program. Program Approach: Import necessary packages to get the…
Q: the program will produce the sum of all the ones, tens and hundreds of all the input numbers.
A: To extract digit from ones, tens, and hundreds place, we use the following statements: To extract…
Q: Write a Python program that displays the times table of a given number. The program asks the user to…
A: Algorithm Start Var n, m Accept n, m from user If(n==0 or m==0) go to step 5 or else to step 8…
Q: use c++ Write a program that prompts the user to enter the number of seconds, displays a message at…
A: The complete C++ code is given below with code and output screenshots Thread is used here...
Q: 2 - Write a python program that ask user to input numbers until user enter exit, and outputs the…
A: Algorithm:- (I) start a while infinite loop, take string input from user until user press exit.…
Q: Exercise 5 Write a program that reads n and x from the screen, then calculate the following (only…
A: According to the Question below the Complete Solution: Program Output:
Q: in python Write a program that prompts the user for three keyboard inputs and stores them in…
A: Write a program that prompts the user for three keyboard inputs and stores them in appropriately…
Q: Design a program that will display an inches –to-centimeters conversion table. The smallest and…
A: Declare two variables for the smallest and the largest value for the inch. Declare a variable to…
Q: Write a program that prompts the user to enter Expo2020 pass (Season, Multi-day, or One-day), adult…
A: ## As no language is mentioned, the code is written in Python. passName = input("Enter…
Q: Write a program that reads an unspecified number of scores (1 - 99) and displays the following…
A: NOTE: Programming language is not mentioned, so doing in C++ In this question, we are asked to write…
Q: Write a program using integers user_num and x as input, and output user_num divided by x three…
A: Write a program using integers user_num and x as input, and output user_num divided by x three…
Q: Write a Python program that will prompt the user for an input number between 11 and 100 inclusive.…
A: The program should not move forward until the user enters a positive integer value. Be sure to add…
Q: Write one python program that will compute both the Least Common Multiple, and the Greatest Common…
A: PROGRAM: #function to calculate Least Common Multiple def calculateLCM(first, second): #list…
Q: The program should then print positive integer as follows: The number of integers entered (not…
A: Since no language is asked in the problem. I am using c language. Here is c program implementation…
Q: Question4: Write a program to take input an integer n followed by n integers. Program should check…
A: According to the Question below the Solution; Output:
Q: int a-5, b-3,c; c=a/b; printf("input a printf("input b: ");scanf ("&d", &b); printf("Result of…
A: Answer is given below .
Q: Write a program that accepts numbers from the user and counts the positive and negative numbers. The…
A: Below is the required code in C++ language. Program Approach: Including header files and using a…
Q: Write a program that changes a temperature reading from Fahrenheit to Celsius using the following…
A: Note: Here you didn't mention any programming language so we are creating the program in the C++…
Q: Write Python code that asks the user to enter a text, then your code should print each word and how…
A: Given: Write Python code that asks the user to enter a text, then your code should print each word…
Q: Write a program that calculates the average word length in a sentence entered by a user.
A: words = input("Enter a sentence: ").split() total = 0 for word in words: total += len(word)…
Q: Write a program that repeatedly reads an integer value from the keyboard until the user enters a…
A: Program code: #create a input array inputs = [] #get the first number x = input(); #while…
Q: Write a program that prompts the user to enter Expo2020 pass (Season, Multi-day, or One-day), adult…
A: The C++ code along with the snapshot of code and output.
Q: Write a program that reads from the user the product unit price, tax percentage to be applied on the…
A: Given: write the program using java
Q: Write a Python program that asks the user to enter a sentence and prints every other character in…
A: EXPLANATION: - The user is given the prompt to enter a sentence using the input function. The input…
Q: Write 2 different programs using if statement and switch statement that will ask the user which…
A: #include<stdio.h>int main(){ double firstN, secondN; char ch; printf("Enter the…
Q: Exercise 4: Write a Python program that asks the user to enter two numbers n and m, then your…
A: PROGRAM STRUCTURE: Takes the value of both the variables. Check the value of the variable if it is…
Q: e to 10 decimal places is 2.7182818285 Write a program that prompts the user for a number of decimal…
A: C++ Code: #include <iostream>#include <iomanip>using namespace std; int main() { //…
Q: QUESTION#4: Write a program that input a number n and then input n numbers. The program must…
A: //importing packageimport static java.lang.Float.sum; //importing packageimport java.util.Scanner;…
Q: int a 5,b- 3,c; printf("input a "); scanf("%d", &a); printf("input b : ") iscanf("&d", &b); e-a/b;…
A: Answer : 3 As the user input value replace the default values.
Q: Task 3 Write a Python code of a program that adds all numbers that are multiples of both 7 and 9 up…
A: Since you have asked multiple questions, we solve first question for you. If you want any specific…
Q: Write a Python code for the following: Ask the user to enter a number, N (Total number of inputs to…
A:
Q: Q1) input the source code (code1)to the program below(code 2), make sure the program can run with…
A: We have been given the two C language codes. We have to add Code 1 in the Code 2 in such a way that…
Q: 1- Write a python code that asks the user to input the x and y coordinated of the points p1, p2 and…
A: As per our company guidelines we are supposed to answer only three sub part. Kindly repost other…
Q: Task 8 Write Python code of a program that reads an integer, and prints the integer if it is a…
A: Given:
Q: Write a python program that continuously prompts the user to input a DNA strand and checks if it is…
A: I have given detailed code below.
Q: Write a Python program that asks the number between 1 and 10. If the number is out of range the…
A: This is a Python Programming Based Question.
Q: rite a program that reads a value n and displays n characters alternating between # and % on the…
A: Note: Since you have not provided the language name to write the code so I am using java language to…
Q: Write a Python program that will indicate which substances will freeze and which substances will…
A: def printFreezeBoil(t,l): freezeList=[] boilList=[] for i in l:…
Q: Exercise 2: Write a Python program that reads from the user an integer n, displays the triangular…
A: logic:- read n if n<=0 display error message else: i=0 while i<=n:…
Step by step
Solved in 3 steps with 3 images
- In python, write a code that allows the user to input two non-negative number sequences in increasing order (the numbers entered are always getting bigger, and no number repeats), both terminated by a -1. The size of each sequence can vary (maybe sequence - 1 has four numbers, and sequence - 2 has seven). The output of this code should be a third sequence that is a combination of both sequences 1 and 2 and is sorted in non-decreasing order. Note: Non-decreasing order means there can be a repeated number in the third sequence (see example 1). A strictly increasing order sequence cannot have repeat numbers at all (see example 3). Remember, all input sequences must be in strictly increasing order! please do this using python, only using while loops. NO language of "break" or "len" please. Hint: we can use three separate lists to solve this code.In PYTHON, write a code that allows the user to input two non-negative number sequences in increasing order (the numbers entered are always getting bigger, and no number repeats), both terminated by a -1. The output of this code should be a third sequence that is a COMBINATION of both sequences 1 and 2 and is sorted in non-decreasing order where if there are two of the same number they are put together in the final sequence. Such as 1, 20.3, 20.3, 66, 7, 4 please do this using PYTHON, ONLY using while loops. NO language of "break", "len", "True", or "return" anywhere in the code! DO THIS USING 3 SEPARATE LISTS!In PYTHON, write a code that allows the user to input two non-negative number sequences in increasing order (the numbers entered are always getting bigger, and no number repeats), both terminated by a -1. The size of each sequence can vary. The output of this code should be a third sequence that is a combination of both sequences 1 and 2 and is sorted in non-decreasing order. Note: Non-decreasing order means there can be a repeated number in the third sequence (see example 1). A strictly increasing order sequence cannot have repeat numbers at all (see example 3). PLEASE do this using PYTHON, ONLY using while loops. NO language of "break", "len" or "True" please. Hint: we can use three separate lists to solve this code.
- This is a segment of program, when it executed with multiple values for n and s the program displays the value of f, choose which output of f values are wrong answersUsing two lists. numSet = [1,2,3] alphaSet = ['A', 'B', 'C'] Write a program that will iterate through the first loop and for each iteration, it will iterate through the nested loop completely. Thus it will perform three inner loops through alphaSet for each loop through numSet. Provide for both the while and for loops in the same program, create nested loops that print a table that looks like this (Write program in python code not Java) 1 A 1 B 1 C 2 A 2 B 2 C 3 A 3 B 3 CIn PYTHON, write a code that allows the user to input two non-negative number sequences in increasing order (the numbers entered are always getting bigger, and no number repeats), both terminated by a -1. The output of this code should be a third sequence that is a COMBINATION of both sequences 1 and 2 and is sorted in non-decreasing order where if there are two of the same number they are put together in the final sequence. Please do this using PYTHON, only using 3 SEPARATE WHILE LOOPS! NO language of "break", "len", "True", or "return" anywhere in the code!
- You wish to display the following text using the print function in Python: >HSBGPG Human bone gla gene\transcript "BGP" GGCAGATTCCCCCTAGACODE What is the correct way to display this output in Python 3.xx? 2. A student is writing Python 3.xx code to read in a dna sequence using the following command: >>> dna=input("Enter a DNA sequence, please:"). The student tries three different ways to compute the index of the second occurrence of the string 'atg' in the dna sequence: A. >>> o1 = dna.find('atg') >>> dna.find('atg',o1+1) B. >>> dna.rfind('atg') C. >>> dna.find('atg',dna.find('atg')+1) Which one is the correct way?Here is the assignment Write a program that prints the multiplication table but inserts a randomly generated incorrect value between 1 and 50 into a cell whose row and column are randomly selected. Make sure the program does insert an incorrect value. For example, if row and column of 3 and 4 are randomly selected, keep generating a random number to print for that location until it's not the right value of 12. Then, ask the user to tell where in the table the incorrect number is located by entering the row and column of the incorrect number. Print whether the user was right or not. If he or she was right, ask for and read the correct value; if not, the program must give the correct location and the correct number. My main issue: is how to set up the multiplication table? I've only learned the basics in C++ (loops and if statements).Construct a while() loop in programming language c, which prints only the even integer numbers in the range n downto 2. Where n is an integer entered by the user. You may assume that n > 1. Show all variable declarations and the prompt for n, along with the appropriate loop. If n is 7, then the output should look like: 6 4 2
- (Use Dev C++) Write a program that reads a list of scores between 0 and 100 and finds and prints the smallest and the largest scores. The program needs to ask for the number of the scores from the user; thisnumber must be less than or equal to 10In Java Write a program that prints the 128-character ASCII table. It should print the tablein eight tab-separated columns. The first column contains a "Dec" heading (fordecimal number) with the numbers 0 through 31 below it. The second columncontains the ASCII characters associated with the numbers 0 through 31. The nextcolumns contain the subsequent numbers and associated ASCII characters. See thebelow sample output for details. Be aware that that output was produced by aprogram running in a console window in a Windows environment. If you runyour program in a different environment, the first 32 characters and the lastcharacter will probably be different from what’s shown below.Note that some characters display in a non-standard manner. For example, thenumber 7 corresponds to a bell sound. You can’t see a sound, but you can see thevacant spot for 7’s character in the below table. The number 8 corresponds to thebackspace character. You can’t see a backspace, but you can see how the…In Java Write a program that prints the 128-character ASCII table. It should print the tablein eight tab-separated columns. The first column contains a "Dec" heading (fordecimal number) with the numbers 0 through 31 below it. The second columncontains the ASCII characters associated with the numbers 0 through 31. The nextcolumns contain the subsequent numbers and associated ASCII characters. See thebelow sample output for details. Be aware that that output was produced by aprogram running in a console window in a Windows environment. If you runyour program in a different environment, the first 32 characters and the lastcharacter will probably be different from what’s shown below.Note that some characters display in a non-standard manner. For example, thenumber 7 corresponds to a bell sound. You can’t see a sound, but you can see thevacant spot for 7’s character in the below table. The number 8 corresponds to thebackspace character. You can’t see a backspace, but you can see how the…