Write a python program to accept a number and if the number is even calculate Z=y modulus x, by taking x and y input from user If number is positive calculate Z=y to the power y by taking y and v inn ut from User
Q: Write a python program to read the area of a circle as input and print the message according to the…
A: area = int(input()) if area>=25 and area<=50: print("Small circle") elif area>50 and…
Q: Write a Python code of a program that adds all numbers that are multiples of either 7 or 9 but not…
A: Divisibility can be checked using the modulus operation. The modulus is the remainder for a…
Q: Write a python program to accept a number and if the number is even calculate Z=x modulus y, o If…
A: I have provided python programs in step 2 and 3.
Q: Write a python program to accept a number and if the number is even calculate Z=y modulus x, by…
A: Code with output given below
Q: Write a Python program which iterates the integers from 1 to 50. For multiples of three print Fizz…
A: HEre is the approach : Create the range from 1 to 50 usig range function . Use end of…
Q: Write a Python program that asks the user for quantity and takes some marks out of 100 as input.…
A: Task :- Write a python program for given task. Python program :- n = int(input())marks = [] #…
Q: Write a program that prompts for and reads the radius and the height of a cylinder (in centimeters).…
A: Program Plan: Create function volume1() to convert the volume of a cylinder by using pass by value…
Q: Write a python program to accept 2 numbers x, y as input from user if modules of two number is equal…
A: Required:
Q: Write a python program to read the area of a circle as input and print the message according to the…
A: required
Q: Write a program that reads a code and temperature. If the co Fahrenheit. If the code is 2, convert…
A: Fortran 90 program: Program Hello IMPLICIT NONE !declaration REAL::temperature,…
Q: Write a program that accepts values for base and exponent and computes and prints the power value.…
A: Algorithm: The algorithm for the above problem is: Start initialise b, e and res=1 read the values…
Q: Write a python program that does the following: 1. prompts the user to guess a character 2.…
A: As given question directly says steps/algorithm of program, just code is given below. Follow…
Q: Write a python program to accept 2 numbers x, y as input from user if modules of two number is equal…
A: Required:
Q: Write a Python program to solve the general version of the above problem. Ask the user for the time…
A: Subproblem 1 requires an explanation. So as we all know that we have a daily periodicity of 24 hours…
Q: Write a python program to accept 2 numbers, if two numbers are not same calculate Z=a+b², if modules…
A: Algorithm: Start Read a,b If a%b and b%a is zero, then read x,y,z Calculate…
Q: Write a python program that prompts the user for a word. If the word comes between the words apple…
A: PROGRAM: #Getting word word=input("Enter the word: ") #Checking word if(word>"apple" and…
Q: • Write a python program to accept a number and O if the number is even calculate Z=x modulus y, o…
A: As per the requirement program is developed. Algorithm: Step 1: Read the number from the user Step…
Q: Write a Python program to: ask the user to enter two integers: int1 and int2. The program uses the…
A: Program Approach- Import the essential modules. Prompt User to input two numbers. Display the…
Q: /Write the program to input the value of x and print the following message: X value odd Massage…
A: As there is no programming language mentioned so i attempted this question in c++ language here user…
Q: Write a python program to accept a number and if the number is even calculate Z=y modulus x, by…
A: First, we will input the "num". Then we will input "x" and "y". Now based on the given condition. Z…
Q: Write a Shell program to read a 5 digit number from user and find the number of occurrences of…
A: I have provided shell script in which you can take user input of number and also you can give…
Q: Write a python program to accept 4 numbers A, C, E, F as input from user if all 4 numbers are even,…
A: We need to write a python program to accept 4 numbers A, C, E, F as input from user if all 4numbers…
Q: Write a Python program that will accept three integers to find their sum. However, if any two values…
A: Actually, python is a easiest programming language... It is a concise (less) code. It is…
Q: Write a python program to accept a number and if the number is even calculate Zx modulus y, if…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.…
Q: Write a python program to accept 4 numbers C,D,E,F as input from user If all the 4 numbers are even,…
A: Take 4 values from user for C, D, E and F Check if all are even than calculate P…
Q: Write a program that takes in an integer in the range 11-100 as input. The output is a countdown…
A: Hi. Let's move on to the code in the next step. I have included comments in the code that will…
Q: Write a python program to read average bill of a supermarket as input and print the message…
A: avgbil = int(input('Enter average bill: '))if 0<=avgbil<=75: print("Normal")elif…
Q: Write a Python program to: ask the user to enter two integers: int1 and int2. The program uses the…
A: Hi there, Please find your solution below, I hope you would find my solution useful and helpful.…
Q: Write a python program to accept a number and check the following conditions if the number is odd,…
A: in this question first take x and y and number from user.. then for each condition write appropriate…
Q: Write a python program in which user enters a value x and in output print the value of sin(x) +…
A: Take input the value of x using input() function as a float variable and then calculate the value of…
Q: write a python program to accept a number and o if the number is even calculate Z=x modulus y, • If…
A: Program using python: x=int(input("enter value for x:"))y=int(input("enter value for y:"))val =…
Q: Write a python program (in Jupiter lab) in which user need to ask for 'input' numbers (num 1 and…
A: Given, Write a program to take multiple inputs from the user until 'q' is entered.
Q: Write a Python program that implements the Taylor series expansion of the function (1+x) for any x…
A: Below I have provided the python code of the given program. Also, I have attached the output of the…
Q: Write a python program to accept a number and if the number is even calculate Z-y modulus x. by…
A: a= int(input()) if a%2==0: x=int(input()) y=int(input()) z = y%x if a>0: x =…
Q: Write a python program to accept a number and if the number is even calculate Z=y modulus x, by…
A: a= int(input()) if a%2==0: x=int(input()) y=int(input()) z = y%x if a>0: x =…
Q: Write a program to input three numbers X, Y and Z and send a message "The answer is equal" in case Z…
A: Since the programming language is not mentioned, I have done the code using Python 3.
Q: Write a program in Python that asks the user to input an integer and print two integers, root and…
A: Given: Write a program in Python that asks the user to input an integer and print two integers, root…
Q: Write a Python program that allows the user to enter any integer value, and displays the value of 2…
A: Given below is the python program that allows the user to enter the value of an integer and displays…
Q: Write a python program to accept 4 numbers A, C, E, F as input from user if all 4 numbers are even,…
A: Python Program: A = int(input("A = "))C = int(input("C = "))E = int(input("E = "))F = int(input("F =…
Q: Write a python program to accept a number and if the number is even calculate Z-y modulus x, by…
A: n=int(input('Enter Number: '))x = int(input('Enter X Number : '))y = int(input('Enter Y Number : '))…
Q: Write a Python code that will calculate the value of y if the expression of y is as follows (n is…
A: Program in python: n=int(input("enter value of n:"))sum=0for i in range(1,n+1): if (i%2!=0):…
Q: write a program in python that reads an integer N from the user, and read a phrase from the user.…
A: here in this question we have asked to write a program in python that take some integer and some…
Q: Write a python program to accept 4 numbers A,C E, F as input from user if all 4 numbers are even,…
A: I have given an answer in step 2.
Q: Write a python program that determines the number of days, hours, minutes, and seconds based on the…
A: Program code: # Function convert second into day # hours, minutes and seconds def…
Q: Write a program c++ that accepts a two-digit number and check if the ones digit is greater than the…
A: Program code: #include <bits/stdc++.h> using namespace std; int main() { cout <<…
Q: Write a program that asks for values from the user and find out which number was entered the most…
A: Find Your Code Below
Q: Write a Python program that implements the Taylor series expansion of the function (1+x) for any x…
A: The answer is in step 2:
Q: Write a Python program to accept a number as input and find corresponding month name, for example if…
A: According to the question below the Complete Solution: Output:
Step by step
Solved in 2 steps
- Write a python program to accept a number and if the number is even calculate Z=y modulus x, by taking x and y input from user If number is positive calculate Z=y to the power x, by taking x and y input from user If the number is equal to 0 calculate Z=x to the power y, by taking x and y input from user If number is in between 1 and 10 calculate Z=x+y)/2, by taking x and y input from user Otherwise display Invalid Input A BIE= = I EWrite a python program to accept a number and if the number is even calculate Z-y modulus x, by taking x and y input from user If number is positive calculate Z=y to the power x, by taking x and y input from user If the number is equal to 0 calculate Z=x to the power y, by taking x and y input from user If number is in between 1 and 10 calculate Z=(x+y)/2, by taking x and y input from user Otherwise display Invalid Input A- B I 三三 !!Write a python program to accept a number and if the number is even calculate Z-y modulus x, by taking x and y input from user If number is positive calculate Z=y to the power x, by taking x and y input from user If the number is equal to 0 calculate Z-x to the power y, by taking x and y input from user If number is in between 1 and 10 calculate Z-(x+y)/2, by taking x andy input from user Otherwise display Invalid Input B. E E E 3
- Write a python program to accept a number and if the number is even calculate Z=y modulus x, by taking x and y input from user If number is positive calculate Z=y to the power x by taking x and y input from user If the number is equal to 0 calculate Z=x to the power y, by taking x and y input from user If number is in between 1 and 10 calculate Z-(x+y)/2, by taking x and y input from user Otherwise display Invalid Input A BI =日三|三 豪Write a Python program that promts the user to enter the sides of a triangle. After checking each side which must be positive, it will display one the following messages: • The input values cannot represent the sides of a triangle Equilateral triangle • Isosceles triangle • Scalene triangle The first check is that all sides must be positive. If one of the sides is not positive, the program will display error message and stops and does not continue reading the remaining sides. The condition for the sides to form a triangle is that the sum of any 2 sides must be greater than the third side. For the remaining cases, the conditions are as follows: Equilateral triangle, all sides are equal. Isosceles triangle, two of the 3 sides are equal. • Scalene triangle, all three sides are different. Note that your output message must match exactly the strings displayed by the sample runs. Sample run 1: Enter side1: -4.5 Sidel must be positive Sample run 2: Enter side1: 5.6 Enter side2: -7.8 Side2…Write a python program that takes pin code(5674,8756,9889,2342) and balance of a user’s account as input. It should then ask the user how much amount he\she wants to withdraw from his\her account. The program should take this amount as input and deduct from the balance. Similarly, it should ask the user how much amount he\she wants to deposit in his\her account. It should take this amount as input and add to the balance. The program shall display the new balance after amount has been withdrawn and deposited. Note: Your program should have all necessary checks on the transactions. Display a menu to the user to let him\her choose between different available options. Make sure to add comments that explains your code
- Write a Python program which computes win/loss record, average score and average point spread of a sports team (or player) Your program must: Pick your favorite team or individual sport which has a single opponent. You will be prompting the user for the points scored by your team and their opponent for a set of games/matches - for sports with only a few games per season (like American football) the set would be the entire season. However, for a sport like baseball with 60 games per season, you may choose to use a smaller set for testing - say the 7 games for the world series. Prompt the user for the name of the team/player and use it to aid in future prompts Prompt the user for the number of games/matches played FOR EACH GAME PLAYED, prompt the user for the points of the favorite team/player and of the opposing team/player Your program must then print the following: win/loss record (how many games your team/player won and how many that team lost) the total points your favorite…Write a Python Program to solve the following problem using NESTED LOOP: Ibra Electricity Company has an automated system that calculates the total bill for each area in a given city. The system gets to know the number of areas from the electricity manager. For each area it asks the number of families in the area. For each family it asks the number of units used and then calculates the total price for the family with the price per unit being 0.4 OMR. It also calculates the sum of the units used for each family in an area and displays that. First, read the number of areas. Then, for each area, read the number of families. For each family read the number of units used and calculate the total price. Along with this calculate the total number of units used in an area by finding the sum of each family’s usage. Finally display the total number of units for each area.Write a program that reads a number in the input and puts it in rax. Then calculate the sum of odd and even digits and put and print in rbx and rdx, respectively.{rax↦ (rbx, rdx)} Input: An a with the following condition: 1 ≤ a ≤ 3×107 Output Print on a line 2 numbers separated by a space. The first number is the sum of odd digits and the second number is the sum of even digits. Input sample 1 138 Sample output 1 4 8 Input sample 2 777 Sample output 2 21 0
- Write a program that takes an integer number between 0 to 100 as input and outputs one of the following: The entered number XXX is Small The entered number XXX is Medium The entered number XXX is Big The entered number XXX is Huge (Where XXX should be the input number) 0 - 25 are considered small 26 - 50 are considered medium 51 - 75 are considered big 76 - 100 are considered huge Any other number should be rejected. Ex: If the input is: 64 the output is: The entered number 64 is BigWrite a Python program that takes a number as input from the user and outputs how many divisors the number has. # assign the result to variable "count"Written in Python The run time of a particular piece of Python code is normally distributed with mean 8 second and standard deviation 1.5 seconds. Write a piece of code to compute the probability that the code take between 7 and 11 seconds to run. Your code should print out the probability, rounded to 4 decimal places.