Lab-03-introtostrings

docx

School

Northeast State Community College *

*We aren’t endorsed by this school

Course

1301

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

2

Uploaded by GrandThunder13213

Report
Lab 03 Python Idle Interface Purpose: In this lab you will explore using the Python in the Idle interface. You will also be introduced to strings. Learning Objectives: Familiarize yourself with the Python commands and the Idle interface. Examine simple Python commands. Lab Materials: Computer with Python 3 installed. Procedure: NOTE: The word document uses printers quotes (“) and (‘). If you just cut and paste the text from the word document, you will get an error. Type the following commands and observe the results. Explain what you see. print(“Not much of a cheese shop”) print('Not much of a cheese shop') Does it appear that (“) and (‘) act differently. test = ‘Not much of a cheese shop’ test is a variable. We will discuss variables in detail later. For now, it is like a name assigned to something. Print(test) test = test+ “Finest in the land.” print(test) Describe what happened. How would you get a space between the p in shop and the F in finest? This is called concatenation and is one way of combining strings. type(test) We are actually looking at the string that test points to.
It is important to know what type of data that we are working with because different data types allow different operations. Deliverables: Please submit a document with your lab results in the appropriate format. For Python programs, this is the .py file. (See lab submission document). Remember that a document without a name will receive a grade of 0. Python programs without the proper comments will receive a 0. Please name your file based on lab submission rules. Upload the document to the drop box.
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