IT 116: Introduction to Scripting
Homework 4

Due

Sunday, February 23rd at 11:59 PM

What You Need to Do

Setup On Your Machine

Specification

Output

Suggestions

  1. Write an assignment statement using the input function that asks the user for the score and gives this value to the variable score.
    Convert this value to an integer.
    Print the value.
    Run the script.
    Fix any errors you find.
  2. Remove the print statement you wrote in the previous step.
    Replace it with an if statement that will run if the value of score 88 or more.
    Inside this if clause, assign grade the value "A".
    Outside this if statement, print the value of grade.
    Run the script.
    Fix any errors you find.
  3. Add an elif clause under the if statement that will run if the value of score is greater than or equal to 76.
    Inside this clause set the value of grade to "B".
    Run the script.
    Fix any errors you find.
  4. Repeat the above step for the grades "C" and "D".
  5. Add an else clause that sets the value of grade to "F".
    Run the script.
    Fix any errors you find.

Testing on Your Machine

Copy the Script to Unix

Testing the Script on Unix (Optional)

Copyright © 2023 Glenn Hoffman. All rights reserved. May not be reproduced without permission.