Concept explainers
Exercises 43-50 refer to the following
Write Number2
What are the program’s
a. Input statements?
b. Assignment statements?
c. Output statements?
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
PRELUDE TO PROGRAMMING (LL) >CUSTOM<
Additional Engineering Textbook Solutions
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Java How To Program (Early Objects)
Problem Solving with C++ (10th Edition)
C Programming Language
Concepts of Programming Languages (11th Edition)
Computer Science: An Overview (12th Edition)
- Question: Write a program in python to achieve the following tasks: Type two statements. The first reads user input into person_name. The second reads user input into person age. Use the int() function to convert person age into an integer. Print your input variables. Below is a sample output for the given program if the user's input is Amy 4: In 5 years Amy will be 9arrow_forwardYou are given a list of students’ names and their test scores. Design an algorithm that does the following:a. Calculates the average test scores.b. Determines and prints the names of all the students whose test score is below the average test score.c. Determines the highest test score.d. Prints the names of all the students whose test score is the same as the highest test score.arrow_forwardExercise 15 Given the radius, in inches, and price of a pizza, design an algorithm to find the price of the pizza per square inch. You may assume that the value of π = 3.141593. In your program, declare a named constant PI to store this value. Below is an example of how the completed program should work:arrow_forward
- IT1815 Laboratory Exercise Understanding Algorithm with Python Objective: At the end of the exercise, the students should be able to: ▪ Construct a Python script based on the given algorithms. Software Requirement: ▪ Python 3.7 or higher Procedure: 1. Study the following sample Python syntaxes: Task Sample Syntax Remarks Variable declaration x = 5 No need to indicate the data type. Do not add semi-colon. Comment #This is a comment. input(“Enter your name”) User input name = Convert string to int(x) Convert to compare or int or float. float(x) compute values. Convert int or float str(x) Convert if the output must to string. show a number and a…arrow_forwardWrite a program to sum of two numbers. Solve this question with steps please.The subject is programming in c. I used to write codes in visual studio 2012.arrow_forward(python) How does Python tell if statements are part of a function, loop, selection statement? a. Brackets { } b. Parenthesis ( ) c. Spacing d. Quotes " "arrow_forward
- 52. To write a program functions such as input four numbers and print their sum, program refinement second level includes a. print the values b. print the variables c. input four numbers d. calculate sumarrow_forwardDo question 15 CSE PYTHON programs: 1. Program to Check Whether a Given Year is a Leap Year2. Program to Read Height in Centimeters and then Convert the Height to Feet and Inches3. Program to Take the Temperature in Celcius and Covert it to Farenheit4. Program to Compute Prime Factors of an Integer5. Program to Generate all the Divisors of an Integer6. Program to Print Table of a Given Number7. Program to Print Sum of Negative Numbers, Positive Even Numbers and Positive Odd numbers in a List8. Program to Print Largest Even and Largest Odd Number in a List9. Program to Find Those Numbers which are Divisible by 9 and Multiple of 3 in a Given Range of Numbers10. Program to Check if a Number is an Armstrong Number11. Program to Print the Pascal's triangle for n number of rows given by the user12. Program to Check if a Number is a Perfect Number13. Program to Check if a Number is a Strong Number14. Program to Find the LCM of Two Numbers15. Program to Find the GCD of Two Numbersarrow_forwardC++ program E x e r c i s e 3Problem StatementInterest on Credit card accounts can be quite high. Most credit card companies compute intereston an average daily balance. Here is an algorithm for computing the average daily balance andthe monthly interest charge on a credit.Steps:Step 1 - Multiply the net balance shown on the statement by the number of days in the billingcycle.Step 2 - Multiply the net payment received by the number of days the payment was receivedbefore the statement date.Step 3 - Subtract the result of the calculation in step 2 from the result of the calculation in step 1.Step 4 - Divide the result of step 3 by the number of days in the billing cycle. This value is theaverage daily balance.Step 5 - Compute the interest charge for the billing period by multiplying the average dailybalance by the monthly interest rate.Specific Example:Here is an example to illustrate the algorithm. Suppose a credit card statement showed a previousbalance of $850. Eleven days before the…arrow_forward
- Using 2019 visual studio MUST BE C PROGRAM given the following pseudocode, write a program that executes it. Use floating-point types for all values. Algorithm Weekly Exercise read x read y compute p = x * y compute s = x + y total = s2 + p * (s - x) * (p + y) print total end Weekly Exercisearrow_forwardUSE PYTHON PLEASE (give the same output as the instruction given) Program Specifications Write a program to calculate a course grade given points for homework, quizzes, practice question, and Survey. Grades are calculated differently for undergrads, grads and distance learners.Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.Step 1 Read from input student status (str). If input is not one of "UG" (undergrad), "G" (grad), or "DL" (distance learner), print an error message and exit the program. Otherwise read from input floats for homework points, quiz points, Practice score, and Survey score. Calculate each category's average using maximum points for homework (800), quizzes (400), Practice question (150), and Survey (200). Output category averages as a percentage using print(f"Homework: {homework:2.1f}%"). Submit for grading to confirm two…arrow_forwardThe code below is for a complete program: Read*, a, b Call math(a, b) Print*, math end real subroutine math (a, b) Integer, intent(in):: a, b math=a/b End Assume that the variables declaration in the subroutine is correct. Assume that the subroutine inputs are: a, b; and one output is: math. The subroutine should return an accurate output. Does this work correctly? If not, how many errors in the code? Question 13 options: 1 to 2 errors 5 to 7 errors more than 7 errors 3 to 4 errors The code will compile and run perfectlyarrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage