Question

In: Computer Science

Please attach the output screenshots, narrative descriptions, or paste the Python codes when requested. Given two...

Please attach the output screenshots, narrative descriptions, or paste the Python codes when requested.

Given two exam scores, exam_1 and exam_2, write a program to determine if the student makes progress (exam_2 is greater than exam_1). Return “Yes” or “No”.

You can use any exam_1 score and exam_2 score for this exercise.

Solutions

Expert Solution

For this, we can use the if-else statement of Python. First, we take the input from the user. Ask the user for exam_1 and exam_2 score.

After taking the input compare exam_1 with exam_2. If exam_2 is greater then exam_1 then print "Yes" else print "No".

Please find below the well commented Python code.

Note: Make sure to use correct indentation while writing Python code.

Code text:

exam_1 = int(input("Enter exam1 score: ")) #take the score of exam1
exam_2 = int(input("Enter exam2 score: ")) #take the score of exam2


if exam_2 > exam_1: #compare exam_1 score with exam_2 score
print("Yes") #if exam_2 score is greater then exam_1 score print 'Yes'
else: #else print 'No'
print("No")

Code image:

Code output:


Related Solutions

Please attach the output screenshots, narrative descriptions, or paste the Python codes when requested. Task 2...
Please attach the output screenshots, narrative descriptions, or paste the Python codes when requested. Task 2 We are producing two types of products, product A and product B. Product A is defective if the weight is greater than 10 lbs. Product B is defective if the weight is greater than 15 lbs. For a given product, we know its product_type and its weight. Design a program to screen out defective products. Starting the program with variable definition: product_type = 'xxx'...
Please attach the output screenshots, narrative descriptions, or paste the Python codes. Please write code to...
Please attach the output screenshots, narrative descriptions, or paste the Python codes. Please write code to print the type of the following variables. Please write down the codes and the output as well. x = 3.5 y = '3.5' z = {1:'John', 2:'Wick', 3:'Barry', 4:'Allen'}
Based on the descriptions given below, write the JavaScript codes to calculate the amount to be...
Based on the descriptions given below, write the JavaScript codes to calculate the amount to be paid for books purchased.  Declare all the variables used in this program.  Ask the user to key-in the book code using a prompt() method. Store the value in a variable named book_code.  Ask the user to key-in the number of books purchased using a prompt() method. Store the value in a variable named book_qty.  Ask the user whether they have...
using python: Given an arbitrary whole number, please write an if statement to output if it...
using python: Given an arbitrary whole number, please write an if statement to output if it is an even number or an odd number
Please attach to the application a brief narrative outlining your academic interests. Include any current or...
Please attach to the application a brief narrative outlining your academic interests. Include any current or long-range interests in research, teaching or other professional objectives. If you have progressed far enough in your career to have publications or other evidence of scholarly endeavor, please describe these. plzzz ans asap...
Please write the program in JAVA and provide me with the output screenshots!! Assignment Objectives •...
Please write the program in JAVA and provide me with the output screenshots!! Assignment Objectives • Be able to write methods • Be able to call methods Introduction Methods are commonly used to break a problem down into small manageable pieces. A large task can be broken down into smaller tasks (methods) that contain the details of how to complete that small task. The larger problem is then solved by implementing the smaller tasks (calling the methods) in the correct...
Java and please have screenshots with source code and output \item[(1)] A palindrome is a string...
Java and please have screenshots with source code and output \item[(1)] A palindrome is a string that reads the same forwards as backwards. Using only a fixed number of stacks and queues, the stack and queue ADT functions, and a fixed number of int and char variables, write an algorithm to determine if a string is a palindrome. Assume that the string is read from standard input one character at a time. The algorithm should output true or false as...
Please in C++, show screenshots of output plus .txt file. thanks Breakfast Billing System Write a...
Please in C++, show screenshots of output plus .txt file. thanks Breakfast Billing System Write a program to help a local restaurant automate its breakfast billing system. The program should do the following: Show the customer the different breakfast items offered by the restaurant. Allow the customer to select more than one item from the menu. Calculate and print the bill Assume that the restaurant offers the following breakfast items (the price of each item is shown to the right...
Please review the operative reports given and audit the coding. Please write if the codes are...
Please review the operative reports given and audit the coding. Please write if the codes are correct or if a different code should be used. Also if a modifier is missing please add it to the code. If everything is correct please write down that you agree with the codes. 1. Case #3 Clinical History/Indications: Patient with Hepatitis C Preliminary ultrasound was performed and a suitable biopsy sire localize over the right lobe of the liver. Conscious sedation was obtained...
Make a calculator in python that always gives an explanation when the answer is output. It...
Make a calculator in python that always gives an explanation when the answer is output. It must be detailed
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT