Q1/ Write a program that takes hours and minutes as input and outputs the total number of minutes (1 hour 30 minutes = 90 minutes) By using functions.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Q1/ Write a program that takes hours and minutes as input and outputs the total
number of minutes (1 hour 30 minutes = 90 minutes) By using functions.
Q2/ If money is left in a particular bank for more than 5 years, the bank pays interest
at a rate of 4.5% of the money; otherwise, the interest rate is 3.0% of the money. Write a
program to accept the number of years in the variable numYears and money in the
variable money then display the correct interest rate, depending on the value input into
numYears by using functions.
Q3/ Write a program to compute and display a person's weekly salary as determined by
the following conditions:
If the hours worked are less than or equal to 40, the person receives $12.00 per hour;
otherwise, the person receives $480.00 plus $18.00 for each hour worked over 40 hours.
The program should request the hours worked as input and display the salary as output.
HINT: using functions.
Q4/ Write a program to find the value of X:
X=2y+5z
where
y= r^2+7
HINT: using functions.
Q5/Write a program which find Y :
x3 - 2 x
if 5>x> 1
Y =
5x
if x = 0
1
if -1 > x 2-5
Transcribed Image Text:Q1/ Write a program that takes hours and minutes as input and outputs the total number of minutes (1 hour 30 minutes = 90 minutes) By using functions. Q2/ If money is left in a particular bank for more than 5 years, the bank pays interest at a rate of 4.5% of the money; otherwise, the interest rate is 3.0% of the money. Write a program to accept the number of years in the variable numYears and money in the variable money then display the correct interest rate, depending on the value input into numYears by using functions. Q3/ Write a program to compute and display a person's weekly salary as determined by the following conditions: If the hours worked are less than or equal to 40, the person receives $12.00 per hour; otherwise, the person receives $480.00 plus $18.00 for each hour worked over 40 hours. The program should request the hours worked as input and display the salary as output. HINT: using functions. Q4/ Write a program to find the value of X: X=2y+5z where y= r^2+7 HINT: using functions. Q5/Write a program which find Y : x3 - 2 x if 5>x> 1 Y = 5x if x = 0 1 if -1 > x 2-5
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY