EBK ELECTRICAL WIRING RESIDENTIAL
EBK ELECTRICAL WIRING RESIDENTIAL
19th Edition
ISBN: 9781337516549
Author: Simmons
Publisher: CENGAGE LEARNING - CONSIGNMENT
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
Question
Transcribed Image Text:of Engineering
Electrical Department
EEB334.315 Computer Programming I
TUTORIAL 01
1) Write an algorithm and draw a flowchart that reads three numbers and prints
the value of the largest number.
2) Write an algorithm and draw a flowchart to read an employee name (NAME),
overtime hours worked (OVERTIME), hours absent (ABSENT) and determine
the bonus payment (PAYMENT).
3)
a) List the five main components of a computer?
b) Describe the work of a compiler?
c) Define source code? Define object code?
d) Explain the advantages of using IDE's List any Five IDF's.
4) Write a pseudocode that reads in two numbers and calculates and print their
average.
5) Write a pseudocode which prompts the user for a Celsius temperature, convert
the temperature to Fahrenheit and prints out the converted temperature.
6) Write a pseudocode to determine if a number is even or odd.
7) Draw a flowchart that determines if a number is even or odd. Create a flowchart
using yED graph editor.
8) Write a pseudocode that will allow a system user to enter five marks for a
student. The program must find the average of those marks and display it on
the screen.
9) Consider the pseudocode below:
Use variables: years OF TYPE INTEGER
Use variables: sales, wage, loyaltyBonus OF TYPE REAL
Use variable: salesmanName OF TYPE STRING
Begin
DISPLAY "Please enter the name of a salesman"
ACCEPT salesmanName
DISPLAY "Please enter sales for this period"
ACCEPT sales
DISPLAY "Please enter number of years he has spent in this
company"
ACCEPT years
wage sales 0.15.
loyaltyBonus: wage 0.1
IF years > 3
THEN wage: wage loyaltyBonus
ENDIF
DISPLAY salesmanName "earns" wage
a) Explain how the pseudocode above works.
b) What would be displayed on the screen if the system user entered P3500 of
sales, John Smith as salesman's name and 2 years for number of years spent?
c) What would be the displayed on the screen if the system user entered P3000 of
sales, Paul Fisherman as salesman's name and 4 years for number of years
spent?
d) Draw a flowchart to depict the algorithm above.
10)
a) Write a pseudocode that prompts the user for hours and rate worked per hour
to compute gross pay.
Enter Hours:35
Enter Rate:2.75
Pay:96.25
b) Modify the above pseudocode to give the employee 1.5 times the hourly rate
for hours worked above 40 hours.
11) Write a program to prompt for a score between 0.0 and 1.0. If the score is out of
range print an error. If the score is between 0.0 and 1.0, print a grade using the
table.
Score
> 0.9
Grade
A
>=0.8
>=0.7
с
>=0.6.
D
< 0.6
F
12) Describe the three kinds of program errors? Explain what kind of errors the
compiler catches?
Expert Solution
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
Step by stepSolved in 2 steps with 11 images
Knowledge Booster
Background pattern image
Recommended textbooks for you
- Text book imageEBK ELECTRICAL WIRING RESIDENTIALElectrical EngineeringISBN:9781337516549Author:SimmonsPublisher:CENGAGE LEARNING - CONSIGNMENTText book imageText book imageElectricity for Refrigeration, Heating, and Air C...Mechanical EngineeringISBN:9781337399128Author:Russell E. SmithPublisher:Cengage Learning
- Text book imagePower System Analysis and Design (MindTap Course ...Electrical EngineeringISBN:9781305632134Author:J. Duncan Glover, Thomas Overbye, Mulukutla S. SarmaPublisher:Cengage LearningText book imageDelmar's Standard Textbook Of ElectricityElectrical EngineeringISBN:9781337900348Author:Stephen L. HermanPublisher:Cengage Learning
Text book image
EBK ELECTRICAL WIRING RESIDENTIAL
Electrical Engineering
ISBN:9781337516549
Author:Simmons
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Text book image
Electricity for Refrigeration, Heating, and Air C...
Mechanical Engineering
ISBN:9781337399128
Author:Russell E. Smith
Publisher:Cengage Learning
Text book image
Power System Analysis and Design (MindTap Course ...
Electrical Engineering
ISBN:9781305632134
Author:J. Duncan Glover, Thomas Overbye, Mulukutla S. Sarma
Publisher:Cengage Learning
Text book image
Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:9781337900348
Author:Stephen L. Herman
Publisher:Cengage Learning