Course Home | Class Schedule | Assignments | Git Submission | Perusall | Python | Tutoring

Saint Louis University

Computer Science 1300/5001
Introduction to Object-Oriented Programming

Michael Goldwasser

Fall 2018

Computer Science Department

Homework Assignment 10

While Loops

Overview

Topic: While Loops
Related Reading: Ch. 10
Due: 10:00am, Friday 5 October 2018

Please make sure you adhere to the policies on academic integrity.


Problems to be Submitted (20 points)

  1. (10 points)

    Write a program that allows the user to enter words, continuing until the user first enters a duplicate. Your program should work as showin in the following interaction. (The underlined parts are those parts typed by the user.)

    Start entering words:
    kiwi	
    apple	
    banana	
    apple	
    You already entered apple.
    You listed 3 distinct words.

  2. (10 points)

    Write a program that answers the following question. Starting with the value x = 1, how many times can x be doubled before reaching one million or more?

    Submit both your source code and the answer you computed for the above question.


Michael Goldwasser
CSCI 1300/5001, Fall 2018
Last modified: Thursday, 04 October 2018
Course Home | Class Schedule | Assignments | Git Submission | Perusall | Python | Tutoring