Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Python Programming for Engineers and Scientists 1st Edition By Cengage (Test Bank).pdf

Rating
5.0
(1)
Sold
-
Pages
124
Grade
A+
Uploaded on
11-03-2025
Written in
2024/2025

Python Programming for Engineers and Scientists 1st Edition By Cengage (Test Bank).pdf

Institution
Course

Content preview

362.pdf




IntroductiongtogComputergProgramminggingPython
AgSunCamgonlinegcontinuinggeducationgcourse




Python Programming for
g g




gEngineers - Part 1: g g g




Expressions, Data Types, Variables,
g g g




Strings and Collections g g




by



Kwabena Ofosu, Ph.D., P.E., PTOE
g g g g




www.SunCam.com Copyrightg2019gKwabenagOfosu,gPh.D.,gP.E.,gPTOE

, 362.pdf




IntroductiongtogComputergProgramminggingPython
AgSunCamgonlinegcontinuinggeducationgcourse


Abstract

Pythongisgagfreegopengsourcegcomputergprogrammingglanguagegthatgdrivesgsomegofgtheginternet’sgm
ostgpopulargwebsitesgsuchgasgGoogle,gYoutubegandgInstagram.gPythongcangbegusedgtogperformgcom
plexgmathematicalgcalculations,ghandlegbiggdata,gbuildgwebgappsgandgdesktopgapplications,gandgma
nagegdatabases.

ThisgcoursegisgthegfirstgofgagseriesgongthegPythongprogrammingglanguage.gThisgcoursegisgtailoredgtogp
racticinggengineers.gThegcoursegbeginsgwithgaggeneralgoverviewgofgcomputersgandgcomputergprogra
mming,gfollowedgbygangintroductiongtogthegPythonglanguage.gThegcoursegthengdelvesgintogthegdetail
sgofgthegIDLEg(PythongGUI)gapplicationgforgdevelopinggandgtestinggPythongscriptsgfollowedgbygtheg
conceptsgofgexpressions,gdatagtypes,gvariables,gstrings,glists,gtuples,gdictionariesgandgsets.gSeveralge
xamplesgofgsituationsgencounteredgbygpracticinggengineersgaregusedgtogdemonstrategthegprogrammi
nggconceptsgandgmethodsgpresentedgingthisgcourse.

Computergprogramminggenablesgpractitionersgtogdrasticallygincreasegtheirgproductivitygandgefficie
ncygbygautomatinggrepetitivegtasksgsuchgasgtediousgdesigngcalculationsgandgprocessingglargegandgco
mplexgdata.gProgramminggpredisposesgengineersgandgscientistsgtogpursuegmoregcreativeg andginnov
ativegsolutionsgingtheirgfieldsgofgspecialty.




www.SunCam.com Copyrightg2019gKwabenagOfosu,gPh.D.,gP.E.,gPTOE ii ofg6

, 362.pdf




IntroductiongtogComputergProgramminggingPython
AgSunCamgonlinegcontinuinggeducationgcourse




TABLEgOFgCONTENTS

Abstract ........................................................................................................................................... ii
ListgofgTables ....................................................................................................................................v
ListgofgFigures................................................................................................................................. vi
1. INTRODUCTION ........................................................................................................................1
1.1 Computers ..............................................................................................................................1
1.2 ComputergProgramming .........................................................................................................2
1.3 RelevancegofgComputergProgramminggtogEngineers ...............................................................4
1.4 PlanninggComputergProgramminggSolutions ..........................................................................4
1.5 Python ....................................................................................................................................5
2. GettinggStarted..............................................................................................................................7
2.1 OpeninggPython ......................................................................................................................7
2.2 AgQuickgTourgofgIDLEg(PythongGUI) ...................................................................................31
3. EXPRESSIONS,gDATAgTYPESgANDgVARIABLES ...............................................................36
3.1 Expressions...........................................................................................................................36
3.2 ArithmeticgOperators ............................................................................................................39
3.3 OrdergofgOperations ..............................................................................................................39
3.4 DatagTypes............................................................................................................................44
3.5 Variables ..............................................................................................................................47
3.6 VariablegNames ....................................................................................................................49
3.7 VariablegNamegConventions .................................................................................................50
4. STRINGS ...................................................................................................................................51
4.1 Definition .............................................................................................................................51
4.2 StringgIndexing .....................................................................................................................51
4.2 StringgSlicing ........................................................................................................................52
4.3 StringgOperators ...................................................................................................................53
4.4 Built-ingStringgFunctions ......................................................................................................54
4.5 Built-ingStringgMethods ........................................................................................................54
4.6 ModifyinggStrings ................................................................................................................58

www.SunCam.com Copyrightg2019gKwabenagOfosu,gPh.D.,gP.E.,gPTOE iii ofg6

, 362.pdf




IntroductiongtogComputergProgramminggingPython
AgSunCamgonlinegcontinuinggeducationgcourse

4.7 FormattedgStringgLiteral ...................................................................................................... 59
5. LISTSgANDgTUPLES ................................................................................................................61
5.1 Lists ......................................................................................................................................61
5.2 ManipulatinggagList.............................................................................................................. 62
5.3 ListgMethods .........................................................................................................................67
5.4 Tuples ...................................................................................................................................69
5.5 ManipulatinggTuples ............................................................................................................69
6. DICTIONARIESgANDgSETS ....................................................................................................71
6.1 Dictionary .............................................................................................................................71
6.2 ManipulatinggDictionaries ................................................................................................... 72
6.3 DictionarygMethods ..............................................................................................................75
6.4 Sets .......................................................................................................................................77
6.5 ManipulatinggSets .................................................................................................................78
6.6 SetgOperationsgandgMethods .................................................................................................78
7. RUNNINGgTHEgPYTHONgFILE...............................................................................................81
7.1 CodegExecution ....................................................................................................................81
7.2 ThegFilegEditor ......................................................................................................................82
7.3 PracticalgExample .................................................................................................................87
7.4 WindowsgCommandgPrompt ..............................................................................................103
8. CONCLUSION ........................................................................................................................115
REFERENCES .............................................................................................................................116




www.SunCam.com Copyrightg2019gKwabenagOfosu,gPh.D.,gP.E.,gPTOE iv ofg6

Connected book

Written for

Course

Document information

Uploaded on
March 11, 2025
Number of pages
124
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$21.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF


Also available in package deal

Reviews from verified buyers

Showing all reviews
1 year ago

5.0

1 reviews

5
1
4
0
3
0
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TESTBANKSIMPRESSIVE Teachme2-tutor
Follow You need to be logged in order to follow users or courses
Sold
8
Member since
1 year
Number of followers
1
Documents
536
Last sold
2 months ago

4.5

476 reviews

5
338
4
70
3
46
2
17
1
5

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions