[Solved] CSE 106 Lab 1

$25

File Name: CSE_106__Lab_1.zip
File Size: 131.88 KB

SKU: [Solved] CSE 106 – Lab 1 Category: Tag:
5/5 - (1 vote)
  • Write an adding program that does the following (10 points):
    1. Ask the user to enter two or more numbers separated by spaces
    2. Print the sum of all the numbers to the console
    3. Throw an error if they do not enter at least two numbers or contain a string
    4. Note: the numbers can be integers or decimals
    5. Example:
      1. The user enters: 1 2 3 4
      2. The program prints: 10
  • Write a punishment automation program in Python that does the following (15 points):
    1. Ask the user to enter a sentence and the of times the sentence should be repeated
    2. The program should write the sentence (with a line break) the number of times specified by the user to a file called CompletedPunishment.txt
    3. Example:
      1. The user enters this for the sentence: I will not sleep in class
      2. The user enters this for the number of repeats: 100
  • The program should write I will not sleep in class 100 times to CompletedPunishment.txt.
  • Write a word count program in Python that does the following (25 points):
    1. Prompt the user to enter a word
    2. Parse PythonSummary.txt and count the number of times the word occurs in the file
    3. Tell the user how many times the word occurs
    4. Note: It should find the word regardless of case (upper or lower) or punctuation
    5. Example:
      1. The user enters: python
      2. The program should print: The word python occurs 13 times
  • Write a class schedule formatting program that does the following (25 points):
    1. Parses classesInput.txt for the following info (on the corresponding line):

Line 0: Number of courses (the following data should exist for each course)

Line 1: Course department

Line 2: Course number

Line 3: Course name

Line 4: Credits

Line 5: Lecture days

Line 6: Start time of the lecture

Line 7: End time of the lecture

Line 8: Average grade (percentage) for the course

  1. Outputs a file with the data formatted as follows:

COURSE 1: <Course department><Course number>:<Course name>

Number of Credits: <Credits>

Days of Lectures: <Lecture days>

Lecture Time: <Start time> <End time>

Stat: on average, students get <average grade> in this course

REPEAT for each additional class, up to <Number of courses>

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSE 106 Lab 1
$25