Hw1

pdf

School

Brooklyn College, CUNY *

*We aren’t endorsed by this school

Course

1215

Subject

Computer Science

Date

Feb 20, 2024

Type

pdf

Pages

3

Uploaded by ConstableExploration21311

Report
CISC 1215: Introduction to Programming Using Python Hw1 (15 Points) Due: Feb 3rd, 11:59 pm Grading, submission, and late policy: You are expected to complete this homework on your own (not with a partner). Please refer to the syllabus for the late submission policy. You must submit your assignment via Blackboard. Q1) Problem-solving [9 Points]: We have a five-character word; we should verify if it is a heterogram. If you need to learn about heterograms, read this link . You should provide step-by-step instructions in English to verify if a three-character word is a palindrome. Someone who does not know about heterograms should be able to use your instructions to verify any five-character word for heterograms. Following your instructions should result in a Yes if the given five-character word is a Heterogram and a No if not. You can assume that the person following your instructions has access to a pen and paper. Answer each of the following questions. 1) (1 point) Are there any inputs to the problem? If yes, what are they? 2) (1 point) Are there any outputs to the problem? If yes, what are they? 3) (1 point) Are there any assumptions in the problem? What are they? 4) (2 points) Write down the step-by-step instructions.
5) (2 points) Run through your instructions step-by-step for the following words: a) Brick b) Grill 6) (2 points) Will your instructions work for any arbitrary N-character word? If not, how will you modify your instructions?
Q2) Answer the following in one or two sentences [6 Points]: 1) (1 point) What is the difference between a value and a variable? 2) (1 point) Can a variable and the value have the same identity (ID)? Explain. 3) (4 points) For each of the statements below entered on a Python interpreter (>>>), explain the statement and the expected output. If there is no output, write N/A. You can assume that the statements are entered one after another in the Python interpreter. a) >>> x = 1 b) >>> x c) >>> y = 1 d) >>> y is x
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help