1-Write a program that will ask the user to enter an integer number and display the (even and divided by 4 numbers), (odd or and divided by 3 numbers), ('not the sake' if others)
Q: 20. or the following code if x = 2: print ('Two or more) else : print (Something else) What value of…
A: We are given a code snippet and we will compare values of x, and statements will be printed…
Q: Car experts recommend changing your air filter as often as every 6000 miles if the oil’s category is…
A: Given:
Q: (Print distinct numbers) Write a program that reads in ten numbers and displays the number of…
A: The required Java code is: import java.util.Scanner;public class Distinct{ public static void…
Q: Converting pounds into kilograms Write a program that converts pounds into kilograms. The program…
A: Algorithm - Take Input User. Add the logic to convert pounds to kg.\ kilograms = pounds *…
Q: 7. Write a program that keeps reading values from the user until the user enters a negative value,…
A: The Answer is in given below steps The code is in c language
Q: Write a program that converts pounds into kilograms. The program prompts the user to enter a value…
A: PROGRAMimport java.util.Scanner;public class Shubham { public static Void main(string[] args) {…
Q: 8) Write a program that asks for the user’s name and then the program will output the last 4…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: Write a single statement that prints a number at random from 3, 5, 7, 9, 11.
A: Write a single statement that prints a number at random from 3, 5, 7, 9, 11.
Q: 3- write a program that display each number, squar root, and its value multiplied by itself as one…
A: Introduction: Computer programming provides a way of obtaining the results of basic or complex…
Q: Write a program that calculates the electricity bill. The rates of electricity per unit are as…
A: A function is a square of code which possibly runs when it is called. You can pass information,…
Q: remember, some companies use letters to show their telephone number. For example, the telephine…
A: //Use "stdafx.h" only, if using visual studio. #include "stdafx.h" // Declare necessary header…
Q: Q2)- Write a program to enter a number from the keyboard, then check: -if the number is bigger than…
A: Given: -
Q: 2. Extract Hours and Minutes (with Boilerplates) by Catherine Arellano Write a program that will…
A: This is related to C programming. Note that You haven't provided time.h or main.c hence only I…
Q: “Fix” the following 3 lines of code so that the print the last line of code correctly: age…
A: EXPLANATION: In the first line, there should be “=” to assign the value and to get the int type…
Q: Write a program in which user is asked to enter two integers (divisor and dividend) and computes the…
A: Program Explanation :- In this Program, the user is required to enter two numbers (separator and…
Q: Excercise2: write a program to print the name of day when entering the number of the day. (For…
A: Since you have not mentioned programming language I'm doing this in c++
Q: The great circle distance is the distance betweentwo points on the surface of a sphere. Let (x1, y1)…
A: Note: Programming language is missing in the question. So we will answer this program in Java…
Q: (Convert feet into meters) Write a program that reads a number in feet, converts it to meters, and…
A: Lets see the solution.
Q: x int (input("Enter a number: ")) if ( Fill this part ): print(x) Fill the part, which is painted in…
A: we have to use the && (and) operator to specify both the conditions
Q: 5. Write a program that generates random numbers as below, random number between 0 and 10 Numl Num2…
A: In the below program srand(time(0)); has been used to make sure that each number generated is…
Q: Create a program to accept a number and identify if this number is even or odd number
A: number = int(input("Enter an number: ")) if (number % 2) == 0: print("{0} is…
Q: Q1. Write a program that takes your full name as input and displays the abbreviations of the first…
A: As no programming language is mentioned it is solved using basic python
Q: You have to 2 ints from the user( a and b) & print their sum on the console. However, sums in the…
A: Please find the answer below :
Q: Q1/ Write a program that reads from the user the number of students in the class and their grades in…
A: This program is in c language program take input as number of student and grade of each student and…
Q: A customer in a store is purchasing five items. Write a program that asks for the price of each…
A:
Q: أسئلة على لغة اسمبلي 1-Write a program to read a letter in lower case then convert this letter to…
A: 1) .MODEL SMALL.STACK 100H.DATA CR EQU 0DHLF EQU 0AH MSG1 DB 'ENTER A LOWER CASE LETTER $'MSG2 DB…
Q: Q4; Write a program to enter a value of x and compute the value of y Where 2(X? + 15) when X >0 Y =…
A: Input : Value of X Output : Value of Y
Q: Q3] ( Write a program to enter a value of x and compute the value of y where x if x ≥ 0 -x if x<0 y
A: In mathematics function is the expression or rule or law which defines the relationship between the…
Q: ecks whether the point is within the circle centered at (0, 0) with radius 10. For example, (4, 5)…
A: Given:
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: Q7) Write program, to allow the user to enter integer number, and find the square and cubic of the…
A: /*C program which allow the user to enter integer number, and find the square and cubic of the…
Q: 1. Write a program that will ask the user to enter a number n and display the numbers from 1 to n on…
A: THIS PROBLEM IS BASED ON MULTIPLE QUESTIONS. ONLY FIRST QUESTION IS SOLVED. KINDLY SEND THE OTHER…
Q: Draw flowchart that reads in three numbers and writes them all in sorted order.
A: Flow chart is a step by step process of representing the algorithm. Flowchart helps to understand…
Q: Q: Write a program that reads non-negative integer number and determines whether it is odd or even…
A: Q1) The semicolons should be commas The correct answer is Option d Answer: In for loop the 3…
Q: (b) A triangle can be classified based on the lengths of its sides as equilateral. isosceles or…
A: Algorithm for the code: Step 1: Declare three sides of the triangle. Step 2: Enter three sides at…
Q: 1. Write a program that takes a two digit number and prints the number backwards.
A: As per the rules of Bartleby i can only solve 1 question at a time if they are not interrelated so…
Q: 4- Write a python program that checks if the number entered by the user is a prime number. 5- Write…
A: ****As per our guidelines i answered 2 questions.Kindly repost other questions as a separate…
Q: Q4) Write a program to enter a number from the keyboard, then check: -if the number is bigger than…
A: In this code, the number is entered by the user and correspondingly the number is checked according…
Q: 26.Temperature Conversion Write a program which prompts the user for a Fahrenheit temperature,…
A: the program is written below:- print("Enter 'x' for exit."); fah = input("Enter Temperature in…
Q: Write a program that prompts the user to input their names and age and then displays your name and…
A: I have given an answer in step 2.
Q: 2.3 Write a Java program that randomly generates three integer numbers between 0-150. Then,…
A: import java.util.*;public class Main{ public static void main(String[] args) { Random rand= new…
Q: Write a program in python that asks the user to enter a word and then capitalizes every other letter…
A: PROGRAM CODE: st = input("Enter the string: ") // take original string from…
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: 1- Write a program in which the user is asked to enter his age based on the year (assuming the…
A: Take input from user. check if the number is positive integer or no. and if the number is positive…
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 code to find the number of twin letters in your name. If they are, display/store them in…
A: It is defined as a low-level programming language for a computer or other programmable device…
Q: What is the output of the last print statement? def math(x, y): z = x +y print(z) y = math(5, 7)…
A: First of all program execute from main function. calling function call the called function. Called…
Q: 5- Write a program that asks the user to enter an angle in degrees and prints out the sine of that…
A: Coded using C++.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Step by step
Solved in 3 steps with 1 images
- 5- Write a program which read a number consists of 4 digits and find the maximum digit of the number. FOR eg. 1472 the maximum digit is 7 the maximum digit is 9 9835Q2: Write a program that inputs a five-digit integer, separates the integer into its individual digits and prints the digits separated from one another by three spaces each. For example, if the user types in 42339, the program should print:4 2 33 9.Q5: Write a program takes two integers numbers from the user and prints the following: 1-The result of sum of the first and second 2- The result of Multiplying the first and second 3-The result of dividing the first on the second 4- The result of Subtraction The second from the first
- Task 3: Find the numbers that can be expressed as the product of two nonnegative integers in succession and print them in increasing order. For each number found the program should check whether the number is a multiple of 5 and indicate this in the output. (For example, 30 is such a number as it can be written as the product of 5 and 6 (30=5x6), which are two numbers in succession.) The user should specify how many such numbers they want to print. Your application should be user friendly. First, you create an initial menu that the user sees when they execute the application. The menu should display the list of operations (the three tasks) that the application can perform. In your menu design, if user enters M or m, the application should print a list of the multiples of the number The user specifies how many numbers to print. The program should display the user’s selection before printing the output. If the user enters a selection which is different from the choices offered, the…Q2: Write a program that inputs a five-digit integer, separates the integer into its individual digits and prints the digits separated from one another by three spaces each.Python Coding- Except ValueError Using Except ValueError, change the program so that if the user inputs something other than "Y" or "N", the program will print to the counsole "Please input Y or N" and re-ask if the user would like the instructions. Here is the coding: def ins():print("There are 23 cases, containing amounts of money varying between $1 and $25k!") print("Type 'Y' for yes or 'N' for no.")userInstruction=input("Do you want instructions on how to play?").upper() if userInstruction=="Y":ins()elif userInstruction:print("OK! Let's begin!")winsound.Beep(345, 500)time.sleep(0.5)else:print("Please input 'Y' or 'N'.") Thank you!
- Assignment: Carefully read the instructions and write a program that reads the following information and prints a payroll statement. Employee’s name (e.g., Smith)Number of hours worked in a week (e.g., 10)Hourly pay rate (e.g., 9.75)Federal tax withholding rate (e.g., 20%)State tax withholding rate (e.g., 9%) In summary, design a program to• Prompt user for 5 values and read the values using Scannero Use method .nextLine() to get the String for the nameo Use method .nextDouble() to get all other numeric values• Calculating the Gross payo Gross pay = hours worked * hourly pay rate• Calculating the Federal withholdingo Federal withholding = Gross pay * federal tax withholding rate• Calculating the State withholdingo State withholding = Gross pay * state tax withholding rate• Calculating the Total deductiono Total deduction = Federal withholding + State withholding• Calculating the Net Payo Net Pay = Gross pay – Total deduction• Formatting the output same as the Sample run (Use ONLY…Assignment: Convert feet into meters: Write a program which reads the number in feet, converts it to meters, and displays the result. One foot is 0.305 meters. One foot is 12 inches. Sample Run Enter the number of feet 16.5 16.5 feet is 5.0325 meters 16.5 feet is 198.0 inchesPYTHON code that finds the prime divisors of a number entered on the keyboard and prints it on the screen write. (For example, the prime divisors of 10 are 2 and 5. The prime divisors of 20 are 2, 2 and 5.
- Exercise II Write a program that finds the positive integer solutions of the following equation ax³ + bx² + cx' + d = 0. The user enters the values of coefficients a, b, c and d. The program should test each integer starting from -50 to 50, and each time the equation is equal to zero, it prints its value as well as "is a solution". At the end, it displays the total number of positive integers found. Note that if the equation has more than one solution, the plural word “solutions" is used in the output. Sample run 1: Enter the coefficient of a, b, c, d: 1 -8.5 21 -13.5 1 is a solution 3 is a solution The equation has 2 integers as solutions Sample run 2: Enter the coefficient of a, b, c, d: 6 48 103.5 67.5 The equation has no integer solutions Sample run 3: Enter the coefficient of a, b, c, d: 1 -1 -12 0 4 is a solution The equation has 1 integer solution"""This program will look for the next perfect square.Check the argument to see if it is a perfect square itself, if it is not then return -1 otherwiselook for the next perfect square.for instance if you pass 121 then the script should return the next perfect square which is 144.""" def find_next_square(sq): root = sq ** 0.5 if root.is_integer(): returroot + 1)**2 return -1 def find_next_sque2(sq): """ Alternative method, works by evaluating anything non-zero as True (0.000001 --> True) """ root = sq**0.5.Task 3: Find the numbers that can be expressed as the product of two nonnegative integers in succession and print them in increasing order. For each number found the program should check whether the number is a multiple of 5 and indicate this in the output. (For example, 30 is such anumber as it can be written as the product of 5 and 6 (30=5x6), which are two numbers in succession.) The user should specify how many such numbers they want to print. -- You need to draw the main flowchartwhich will show the logic of your entire application --