Write a program for calculating and printing the number set 4,4.5,5,5.5,6,.............9.5,
Q: a program that stores and prints the months of a year:
A: a program that stores and prints the months of a year:
Q: the result of the expression:int(1011)
A: the result of the expression:int(1011)
Q: Sometimes we write similar letters to different people. For example, you might write to your parents…
A: Note: Since no programming language is mentioned in the question, the program has been provided in…
Q: Write a program that takes any number of non-negative integers as input, and outputs the average and…
A: In the solution of given program, we read integer numbers through loop and try to find maximum…
Q: 10) Write a program that translates a letter grade into a number grade. Letter grades are A, B, C,…
A: note:- always mention programming language name in question, this is done in python. logic:-…
Q: (B)The following is a list of 20 exam scores. Write a computer program to calculates the average…
A: Python Program:- n=int(input("Enter the number of elements to be inserted: "))a=[]for i in…
Q: Using Python: Write a program which repeatedly reads numbers until the user enters “done”. Once…
A: The total will be used to give the sum of numbers entered, the count will give the number of values…
Q: Computer Science Write a program to turn ON LEDs like 11,13,14,12 placed on trainer
A: Assembly Language Program ORG 0000HMOV A,#02HMOV P3,AACALL DELAYMOV A,#06HMOV P3,AACALL DELAYMOV…
Q: Write a program that simulates rolling a pair of dice. The program should answer the question "how…
A: Solution: Procedure:
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: 9. Write a program that inputs two real numbers then exchanges their values. 10. Make a program that…
A: 9 Solution
Q: Create a different version of the program that: Takes a 3-digit number and generates a 6-digit…
A: num = int(input("Enter number: ")) if(len(str(num))==2): one = int(str(num)[0])…
Q: Write C code for a program that reads a positive integer number n, and then calculates and prints…
A: GIVEN: Write C code for a program that reads a positive integer number n, and then calculates and…
Q: Write in symbolic form: For all integers x,there exists an integer y such that the sum of x and y…
A: A symbolic form of quantifier use symbols like ∀,∃ etc. to represent the statement. It help to…
Q: Write a program whose input is a word or phrase, and that outputs whether the input is a palindrome.
A: 1. Input the string 2. Remove spaces from the input string 3. Reverse the string 4. If the reversed…
Q: 1. In the game of Monopoly, a pair of dice are rolled to move a player's piece around the board. If…
A: %fifty times rollingplayer1_total_double = 0;player2_total_double = 0;player1_totalSteps =…
Q: Description: The Fibonacci numbers are stated as an infinite sequence starting with 0 and 1, which…
A: Main.java package application; import javafx.application.Application;import…
Q: 1. Write a program that prints your name, age, and department in console 2. Write a program that…
A: As no programming language is mentioned, it is solved using C++
Q: Write pseudo code that will calculate a running sum. A user will enter numbers that will be added to…
A:
Q: Write a program whose inputs are three integers, and whose output is the smallest of the three…
A: Since the coding language is not mentioned, I have done the code in C++. Algorithm : Step 1 :…
Q: 4. Write a program that asks the user to enter two positive integers, the height and length of a…
A: The below given Python program will obey the following rubrics: Displaying message to the user to…
Q: Exercise 1: In this exercise we are asked to write a program that prompts the user for a positive…
A: Input n if(n>0) { while(n>0) { r=n%10; //find remainder…
Q: (b) In a crypto-arithmetic puzzle, a mathematical equation is written using letters. Each letter can…
A: Python Program: From itertools import combinations, permutations x = input("Enter the value of x: ")…
Q: How do I write a python program that writes a creative quiz program that consists of three original…
A: Given: We are given a problem where we have to design a quiz which asks three questions and based on…
Q: Write a Python program that takes two int values from user and print the smallest among them.
A: number1=int(input("Enter your first integer number:"))number2=int(input("Enter your second integer…
Q: Write a program that, given the time duration of a task in the number of hours, minutes, and…
A: I have provided c++ code in step2
Q: 2. - Write a program that displays the area and perimeter of a rectangle with the width of 5 And…
A: width=5; #initialize widthheight=7.5; #initialize height area=width*height; #calculate area…
Q: 1) Write the program that can add given two numbers. Modify your program that can add any two…
A: Actually, program is a executable software that runs on a computer.
Q: Complete the following program that collects an input word from the keyboard and finds if the word…
A: Solution Code word = input("enter")is_palindrome = Truei=-1for j in range(len(word)): if word[j]…
Q: 1. Examine the following code: After this code executes, what is the value of x? y? 2. Examine the…
A: 1) When the value of x = 9 and y = ++x Code ( in java ) - public class Main{ public static void…
Q: 4.Write a program that displays a Pascal triangle. The program prompts the user to enter the number…
A: The answer is in below steps:
Q: Q1. Write a program that inputs three integers and outputs their sum. Use the JOptionPane class for…
A: Joptionpane: Standard dialogue boxes, such as message dialogue boxes, confirm dialogue boxes, and…
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: 1. Write a program that converts miles to feet. If the distance is more than 15,000 feet, tell the…
A: C program to solve the given problem is below.
Q: Using Python: Write a program which repeatedly reads numbers until the user enters “done”. Once…
A: Introduction Using Python: Write a program which repeatedly reads numbers until the user enters…
Q: Q5/ 1. 1. Write a program to read three marks and calculate the average. If the student's average is…
A: Since no programming language is mentioned, I am using python. As per our guidelines, we are…
Q: Write a program that performs as a very simple calculator. Your calculator should be able to handle…
A: GIVEN: Write a program that performs as a very simple calculator that handles the four basic math…
Q: Write a NumPy program to count the number of days of a given month for the given years import numpy…
A: Here I have used a function named datetime64(). This function datetime64(), is present in the NumPy.…
Q: Write a program to find out the grade of a student based on the marks obtained in three subjects.…
A: As the programming language is not mentioned so, I am using C language to write a code. If you want…
Q: Write a program that would compute the sum, difference, product, quotient, and will print the…
A: As no programming language is mentioned, it is solved using C++
Q: C++) Write a program with total change amount as an integer input, and output the change using the…
A: /*Write a program with total change amount as an integer input that outputs the change using the…
Q: y has an extra book available with her. In a class of 50 students she want to give the book to a…
A: Required: Jammy has an extra book available with her. In a class of 50 students she want to give the…
Q: write a program in which ask from a user to enter name and id and show there as well. then ask again…
A: Since no programming language is mentioned, I will attempt this in python. if you need it in a…
Q: E2.8 Write a program that asks the user for the lengths of the sides of a rectangle. Then print •…
A: As you have not mentioned any specific language so I give the code in Python along with output and…
Q: 5. Write a program that computes the spherical distance between two points on the surface of the…
A: java code: public class Test { static double compute(double lat1, double lon1,…
Q: 1. PYTHON Write the python code which selects a random number between 1 and 10, once. Prompt the…
A: 1)Code: As Our Company Policy we need to answer the very first question please post remaining…
Q: 2. Write a program that computes the cost of painting and installing carpet in a room. Assume that…
A: Actually, program is a executable software that runs on a computer.
Q: PYTHON Write a program which prompts the user for a distance in Kilometers, the program should…
A: Here, we are going to write a Python program which will take distance in kilometers from user and…
Step by step
Solved in 2 steps with 2 images
- Write a program that calculates the equivalent resistance of a circuit. n electrical resistors with resistance values R1, R2,.., Rn are said to be connected in parallel if the same voltage is applied across each. Their equivalent resistance Reg is related to the values R1, R2, ..., Rn by: 1 1 1 1 + +...+ R R R, R. "eq Write a program that prompts the user to enter the resistance of n resistors. The user should be prompted continuously by using a while loop until a zero or negative value is entered (the program should count the number of resistors n entered by the user and store the values in an array). Use another separate loop to print the resistance values entered by the user and the equivalent resistance Reg. Test your program with R1= 1 kn, R2= 2 kn, R3= 4 kQ and R4= 8 kQ.. Write a program that generates and prints 50 random integers, each between 3 and 6. .Write a program that generates a random number, x, between 1 and 50, a random number y between 2 and 5, and computes x". .Write a program that generates a random number between 1 and 10 and prints your name that many times. .Write a program that generates a random decimal number between 1 and 10 with two decimal places of accuracy. Examples are 1.23, 3.45, 9.80, and 5.00.Task 9 Write Python code of a program that reads an integer, and prints the integer if it is a multiple of NEITHER 2 NOR 5. For example, 1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39 ... hint(1): use the modulus (%) operator for checking the divisibility hint(2): You can consider the number to be an integer !%3%===== Example01: Input: 3 Output: 3
- Summary: Given integer values for red, green, and blue, subtract the gray from each value. Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray). Given values for red, green, and blue, remove the gray part. Ex: If the input is: 130 50 130 the output is: 80 0 80 Find the smallest value, and then subtract it from all three values, thus removing the gray.Summary: Given integer values for red, green, and blue, subtract the gray from each value. Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray). Given values for red, green, and blue, remove the gray part. Ex: If the input is: 130 50 130 the output is: 80 0 80 Find the smallest value, and then subtract it from all three values, thus removing the gray. Note: This page converts rgb values into colors. 461710.3116374.qx3zqy7 LAB ACTIVITY 1 111 4.10.1: LAB: Remove gray from RGB Type your code here. 111 main.py 0/10 Load default template...Summary: Given integer values for red, green, and blue, subtract the gray from each value. Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray). Given values for red, green, and blue, remove the gray part.
- /*code Kth Largest Factor A positive integer d is said to be a factor of another positive integer N if when N is divided by d, the remainder obtained is zero. For example, for number 12, there are 6 factors 1, 2, 3, 4, 6, 12. Every positive integer k has at least two factors, 1 and the number k itself.Given two positive integers N and k, write a program to print the kth largest factor of N. Input Format: The input is a comma-separated list of positive integer pairs (N, k). Output Format: The kth highest factor of N. If N does not have k factors, the output should be 1. Constraints: 1<N<10000000000 1<k<600. You can assume that N will have no prime factors which are larger than 13..A palindromic number is a number that is the same when written forwards or backwards. The first few palindromic numbers are therefore are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 323 Input a number from the user. Write a program that reverses the digits of a number. Use this program to find if the number is a palindrome. Print if the number is palindrome or not.You are given an integer, N. Your task is to print an alphabet rangoli of size N. (Rangoli is a form of Indian folk art based on creation of patterns.) Different sizes of alphabet rangoli are shown below: #size 3 ----C---- --c-b-c-- c-b-a-b-c --c-b-c-- ----C---- #size 5 ------e-d-e-- ----e-d-c-d-e---- --e-d-c-b-c-d-e-- e-d-c-b-a-b-c-d-e --e-d-c-b-c-d-e-- ----e-d-c-d-e---- e-d-e---- ---- #size 10 --j- -j-i-j- --j-i-h-i-j-- ---j-i-h-g-h-i-j- --j-i-h-g-f-g-h-i-j- -j-i-h-g-f-e-f-g-h-i-j-- ------j-i-h-g-f-e-d-e-f-g-h-i-j-- ----j-i-h-g-f-e-d-c-d-e-f-g-h-i-j--- --j-i-h-g-f-e-d-c-b-c-d-e-f-g-h-i-j-- j-i-h-g-f-e-d-c-b-a-b-c-d-e-f-g-h-i-j --j-i-h-g-f-e-d-c-b-c-d-e-f-g-h-i-j-- ----j-i-h-g-f-e-d-c-d-e-f-g-h-i-j-- -j-i-h-g-f-e-d-e-f-g-h-i-j- -j-i-h-g-f-e-f-g-h-i-j- ---j-i-h-g-f-g-h-i-j- --j-i-h-g-h-i-j- -j-i-h-i-j- j-i-j- The center of the rangoli has the first alphabet letter a, and the boundary has the Nth alphabet letter (in alphabetical order). Eunction Descrintion
- You are given an integer, N. Your task is to print an alphabet rangoli of size N. (Rangoli is a form of Indian folk art based on creation of patterns.) Different sizes of alphabet rangoli are shown below: #size 3 ----c---- --c-b-c-- c-b-a-b-c --c-b-c-- ----C---- #size 5 --------e-- ------e-d-e--- ----e-d-c-d-e--- --e-d-c-b-c-d-e-- e-d-c-b-a-b-c-d-e --e-d-c-b-c-d-e-- ----e-d-c-d-e-- ------e-d-e--- #size 10 -j- -j-i-j-- --------j-i-h-i-j- ---------j-i-h-g-h-i-j-- ---------j-i-h-g-f-g-h-i-j-- --------j-i-h-g-f-e-f-g-h-i-j-- ------j-i-h-g-f-e-d-e-f-g-h-i-j--- ----j-i-h-g-f-e-d-c-d-e-f-g-h-i-j--- --j-i-h-g-f-e-d-c-b-c-d-e-f-g-h-i-j-- j-i-h-g-f-e-d-c-b-a-b-c-d-e-f-g-h-i-j --j-i-h-g-f-e-d-c-b-c-d-e-f-g-h-i-j-- ----j-i-h-g-f-e-d-c-d-e-f-g-h-i-j---- ------j-i-h-g-f-e-d-e-f-g-h-i-j--- --------j-i-h-g-f-e-f-g-h-i-j- --j-i-h-g-f-g-h-i-j-- --j-i-h-g-h-i-j- --j-i-h-i-j- -j-i-j-- -j- The center of the rangoli has the first alphabet letter a, and the boundary has the Nth alphabet letter (in…The area of a hexagon can be computed using thefollowing formula (s is the length of a side): Write a program that prompts the user to enter the side of a hexagon and displaysits area. Here is a sample run: Enter the side: 5.5 ↵EnterThe area of the hexagon is 78.59Q15. * After performing the operations: dequeue(), dequeue(), enqueue('S'), the value of Front becomes ........ 4 O 1 O 3 O 2 0 E Front 1 X 2 A 3 M Rear 4