Module 2 - Data Manipulation and Input
Module 2 - Data Manipulation and Input
Module 2 - Data Manipulation and Input
Data
Manipulation
and Input
Module 2
1
Click to edit Master title style
Outline:
• Data Input
• String and Number Manipulation
• Placeholders
• String Methods
2
ClickUser
The to edit Master title style
Input
3
ClickUser
The to edit Master title style
Input
• The input() function takes the user's input from the next line
• The input() will capture it and assign it to a variable if assigned
• The variable will display whatever the user has provided as the
input
• The input() function always reads the input as a string, even if
comprises of digits
4
Click to edit[04]
Simulation Master title style
5
Click to String
Python edit Master title style
6
Click to String
Python edit Master title style
7
Click toSequence
String edit Master title style
8
Click to editNature
Immutable Masteroftitle style
String
9
Clickstr
The to Class
edit Master title style
10
Click to Sequences
Escape edit Master title style
11
Click to Sequences
Escape edit Master title style
12
Click toOperators
String edit Master title style
13
Click to edit[05]
Simulation Master title style
14
Clickformat()
The to edit Master
Methodtitle style
The format() method formats the specified value(s) and insert them
inside the string's placeholder
15
ClickPlaceholders
The to edit Master title style
16
Click to edit[06]
Simulation Master title style
17
Click toMethods
String edit Master title style
• str.capitalize() Returns the copy of the string with its first character capitalized and the rest of the letters are
in lowercase
• string.casefold() Returns a lowered case string. It is similar to the lower() method, but the casefold()
returns False.
18
Click toMethods
String edit Master title style
21