Write a Python program that takes mark of a subject as input and shows grade according to given conditions.
Q: Write a python program to read average bill of a supermarket as input and print the message…
A: Here I have first asked the user to enter the average bill. Now I have used the if-else block to…
Q: Write a program whose input is two integers. Output the first integer and subsequent increments of 5…
A: Use a for loop to print numbers and email r
Q: 6-Write a PYTHON program that takes a date as input and outputs the date's season in the northern…
A: According to the question below the solution: Output:
Q: Write a program that computes the cost of the postage on first-class mail according to the following…
A: Algorithm for calculating the cost of the delivery of the mail:Step1: Declare…
Q: Write a Python program that prompts the user for the cost of two items to be purchased. Then prompt…
A: PROGRAM EXPLANATION: Start. Take the cost of the first item as input. Take the cost of the second…
Q: Write a python program that takes the CGPA and no of credits completed by a student and prints…
A: CGPA = float(input("Enter CGPA: "))CreditsCompleted = int(input("Enter No.of Credits Completed: "))…
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 reads three numbers and prints "all the same" if they are all the same, "all…
A: Any number of these statements can be nested inside one another.
Q: Write a python program to read average bill of a supermarket as input and print the message…
A: avg = int(input()) if avg>=50 and avg<=100: print("Normal") elif avg>=101 and…
Q: Write a python program to accept a number and if the number is even calculate Z=y…
A: Given That Write a python program to accept a number and if the number is even calculate Z=y…
Q: Write a python program that takes a sale amount as an input and print the discount message as given…
A: This problem can be solved using basic conditional statements. Follow the code below for better…
Q: Write a program with total change amount as an integer input that outputs the change using the…
A: Program: def exact_change(user_total): dollars = user_total // 100 user_total %= 100…
Q: Write a python program that determines whether a student is eligible for PG course or not . To be…
A: We need to write a Python code for the given scenario.
Q: Write a Python program that determines a student’s grade. The program will read three types of…
A: Here I have taken input from the user and then stored it into 3 different variables. Next, I have…
Q: C#, that reads the price and quantity from the user and calculate the amount due . If the amount due…
A: Start Print "Enter the price: " Input price Print "Enter the quantity: " Input quantity amt <-…
Q: python Write a program that takes in a line of text as input, and outputs that line of text in…
A: Step 1:- Given:- Takes in a line of text as input, and outputs that line of text in reverse. The…
Q: Write a python program which takes any alphabet from the user and it gives its alphabet number…
A: # Program to find the ASCII value of the given character c = input() print("The ASCII value of '"…
Q: Write a python program to calculate the electricity bill after taking units from user. The units…
A: Required:- Write a python program to calculate the electricity bill after taking units from the…
Q: In Python write a program that demonstrates the scenario below: An employee’s total weekly pay…
A: We need to provide a python program to employee’s total weekly pay. Where, total week pay= regular…
Q: Write a program whose input is a character and a string, and whose output indicates the number of…
A: class GF{ public static int count(String s, char c) { int res = 0; for (int i=0; i<s.length();…
Q: Write a python program to read average bill of a supermarket as input and print the message…
A: I have provided solution in step2.
Q: Write a python program to check if a variable, x, is divisible by 2, 3 or 5. If it is divisible by…
A: num = int(input())isDivisible = False if num % 2 == 0: isDivisible = True print('Divisible by…
Q: Write a Python program that takes the value of n from the user and calculates the value of S using…
A: Algorithm: Start Read a number n If n<=0, print Invalid Input! Else initialize S to 0 Iterate…
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 program that will calculate and print out bills for the city water company. The water rates…
A: Program code: #include <iostream>#include <cmath>using namespace std;int main(){int…
Q: Write a program in Python that reads the following information and prints a payroll statement:…
A: answer : import java.util.scanner; public class employeepayroll { public static void main(string[]…
Q: Write a program in Python that takes in a line of text as input, and outputs that line of text in…
A: def reverse(s): newString = "" for c in s: newString = c + newString return…
Q: Write a python program to calculate the average of the student in 3 courses and display the grade…
A: print('enter subject 1 marks')a=int(input())#inputting subject1print('enter subject 2…
Q: Write a program whose input is: firstName middleName lastName, and whose output is: lastName,…
A: name = input()list = name.split() if len(list) == 2: modifiedName = list[1] + ", " + list[0]elif…
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 program that reads three numbers and prints "increasing" if they are in increasing order,…
A: Python program to solve the given problem is below.
Q: Write a python program that will take the number of goals and the number of assists by a footballer…
A: Find Your Solution Below
Q: Write a C program to ask the user to input the name of boy and name of girl. Count the number of…
A: code : #include<stdio.h>int main(){ char boy_name[20],boy_cmn[20]; char…
Q: Write a code using C++ for the given prompt: A contractor orders, say, 30 cubic yards of premixed…
A: #include <cmath> #include <iostream> using namespace std; int main() { double…
Q: Write a python program that accepts as input the loan amount, the interest rate per year, and the…
A: loan = int(input("How much is the loan: "))rate = int(input("Enter interest rate:…
Q: Write a python program and take two inputs from the user. The first input will be the number of…
A: #reading two inputs from usernumberOfCanvases = int(input('Enter number of…
Q: write a Python program that should accept a word with maximum length of 25. A sentence is given,…
A: #reading sentence word by words=""#to store sentencewhile True:#runs until a word with upper case…
Q: Write in Python program... for an invoice calculation program, write the python program that…
A: code:
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 asks the user how many credits they have taken. If they have taken 23 or…
A: Python program Prompt the user to enter the credits they have taken. Store the user entered…
Q: Write a Python program that assigns the principal amount of R10000 to variable p, assign to n the…
A: P=1000n=12r=0.08t=int(input("Enter number of months interest will be compounded:…
Q: Mr Jone has two walls of different dimensions such that their dimensions are to be given input in…
A: feet1, inch1 = input("Enter the height of wall 1 : ").split()feet2, inch2 = input("Enter the width…
Q: Write a python program that takes 2 inputs from the user. The first input is a string and the second…
A: Given: Write a python program that takes 2 inputs from the user. The first input is a string and the…
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 program to accept 2 numbers P, Q as input from user if number P is negative and even,…
A: P = int(input("Enter a number: ")) # taking P from user Q = int(input("Enter…
Q: Write a Python program that will receive as input the name and price of an unknown number of items.…
A: Let us consider a python program that will receive as input the name and price of unknown number of…
Q: Write a program that mimics a calculator. The program should take as input two integers and the…
A: #include <iostream>#include <iomanip>using namespace std;int main(){char op;int…
Q: program that takes in a text with dimacs format and checks whether the clause is satisfiable, if so,…
A: // Java implementation to find if the given // expression is satisfiable using the // Kosaraju's…
Q: In Python, Write a program that takes in a line of text as input, and outputs that line of text in…
A: EXPLANATION: - An empty list named str_list is created to store the string the user enters. The…
- Write a Python program that takes mark of a subject as input and shows grade according to given conditions.
If mark >= 90 : Grade A
If mark >= 80 : Grade B
If mark >= 70 : Grade C
If mark >= 60 : Grade D
If mark >= 40 : Grade E
If mark < 40 : Grade F
WRITE IN PYTHON AND SHOW OUTPUT
Step by step
Solved in 2 steps with 7 images
- discrete math programing python or c++ the range of values is from 0 to 5 Let Q(x, y) denote “x + y = 5” The domain of x and y is from range 0 to 5 . Implement the code that outputs the truth values of the following quantifications: 1. ∀x ∀y Q(x, y) 2. ∀x ∃y Q(x, y) **Display values of variables x and y if the quantification is true.Create a program in C++ that accepts sales for the week ( Monday - Friday ) and display the highest sale, the lowest sale, and the average sales. Use a function that returns the lowest sale, highest sale and the sales average.Sample Input/Output display:Input Sales for Monday: 1500.00Input Sales for Tuesday: 2000.00Input Sales for Wednesday: 1000.00Input Sales for Thursday: 2500.00Input Sales for Friday: 3000.00Lowest Sale: 1000.00Highest Sale: 3000.00Sales Average: 2000.00Write a program in Python, C++, or C that gets an integer from the user, prints out that value, then passes that value to a function, that doubles the number and returns back out the doubled number back to the main function and prints out that value to the screen.
- Write a program in C++ that inputs three integers from the keyboard and prints the sum, average and product of these numbers. The screen dialog should appear as follows: Input three different integers: 13 27 14 Sum is 54 Average is 18 Product is 4914About initial python programming: Write a program that reads a code i, in a range of 1 to 4, and 3 positive integer a, b, c values, with a < b.If code i = 1 then calculate the area of the trapezoid of bases a and b and height c and display it along with the read values.If code i = 2 then calculate a · a, b · b and c · c, showing along with the read values.If code i = 3 then calculate the arithmetic mean between a, b and c, and display it together with the read values.If code i = 4 then calculate and show the sum of integers from a (inclusive) to b (inclusive) with a variation equal to c (if a = 5, b = 19 and c = 3, then sum = 5 + 8 + 11 + 14 + 17 = 55).IMPORTANT: Each of the features described above must be implemented in one (or more) functions.c++ A palindrome is a word or a phrase that is the same when read both forward and backward. Examples are: "bob," "sees," or "never odd or even" (ignoring spaces). Write a program whose input is a word or phrase, and outputs whether the input is a palindrome. If the input is bob, the output is: bob is a palindrome If the input is bobby, the output is: bobby is not a palindrome Hint: Start by just handling single-word input, and submit for grading. Once passing one single-word test cases, extend the program to handle phrases. If the input is a phrase, remove or ignore spaces. 356110.1926120.qx3zqy7
- Case Scenario: You are going to build a "reverse" guessing game in Python. You will think of a number, the computer will make a guess, and you will tell the computer if it was correct or to adjust its next guess higher or lower. The computer has 10 tries to guess your number. What Your Python Program Should Do: Your program will try to guess a number that the user is thinking of, between 1 and 20. Your program should accept input from the user as to whether its guess was too high or too low, and change its next guess accordingly. The computer has 10 tries to guess the number the user is thinking of. For each guess the computer makes: 1. Print a message telling the user what number the computer guessed. 2. Ask the user to enter “h” if the computer's guess was too high, “1” if the computer's guess was too low, or "c" if the computer's guess was correct. All letters are lowercase and without quotes. 3. If the computer's guess was correct, print a message telling the user how many guesses…Python language Due to lockdowns in many countries business have fall down and face recession. Looking at situation a company has decided to cut down its customers’ credit limits in half. Thus if any customer had credit limit of 60 thousands pkr now its 30. If a customer had 40 thousands limit, it now 20. You are required to write a python program that analyzes the credit status of three customers of this company. For each customer you’re given: a) The customer’s account numberb) The customer’s credit limit before the recessionc) The customer’s current balance (i.e., the amount the customer owes the company).Your program should calculate and print the new credit limit for each customer and shoulddetermine (and print) which customers have current balances that exceed their new credit limits.Please in C#, Create a program that generates a Frequency DistributionTable, compute and display the descriptive statistics of any given line of text. The program should follow the sample output below:
- Write a program in C++ to find the area and circumference of a circle. Formula:circumference = 2*PI*radius;area = PI*(radius*radius); Sample Input:Input the radius(1/2 of diameter) of a circle : 5 Sample Output:The area of the circle is : 78.5397The circumference of the circle is : 31.4159Write a program in C++ that lets the user input an odd number of positive integers ( each separated by one space). Assume that each integer except for one, the exclusive integer, appears an even number of times in the input. The program should output the exclusive integer. Example: Enter integers: 2 1 55 3 2 1 4 4 2 2 55 Exclusive: 3True/False 5. In Python, some parameters are passed by reference