Untitled
30 Questions
8 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

are made up of whole numbers, their negative counter parts and zero.

Integers

are numerical values that has decimal point.

float

are used in tasks ranging from simple daily counting to advance science and business calculations. Python follows PEMDAS precedence

Arithmetic Operators

Addition sign

<ul> <li></li> </ul> Signup and view all the answers

Multiplication sign

<ul> <li></li> </ul> Signup and view all the answers

floor division

<p>//</p> Signup and view all the answers

exponent

<p>**</p> Signup and view all the answers

remainder

<p>%</p> Signup and view all the answers

also called python relational operator, compares the values of two operands and returns True or False based on whether the condition is met.

<p>Comparison Operators</p> Signup and view all the answers

less than

<p>&lt;</p> Signup and view all the answers

greater than

<blockquote> </blockquote> Signup and view all the answers

less than or equal to

<p>&lt;=</p> Signup and view all the answers

greater than or equal to

<blockquote> <p>=</p> </blockquote> Signup and view all the answers

equal to

<p>==</p> Signup and view all the answers

not equal to

<p>!=</p> Signup and view all the answers

begins and ends with either three single quotes or three double quotes. Any quotes, tabs, or newlines in between the “triple quotes” are considered part of the string.

<p>multiline strings</p> Signup and view all the answers

allow you to include special characters in strings. To do this, simply add a backslash () before the character you want to escape.

<p>escape sequences</p> Signup and view all the answers

means to combine or join two or strings together using the addition sign (+). Since Python does not add a space when concatenating, you have to manually add the space manually.

<p>Concatenation and Multiplication</p> Signup and view all the answers

is used to get a specific character within a string-valued variable. Python offsets start at 0 and end at one less than the length of the string

<p>offset operator</p> Signup and view all the answers

u can also get a certain amount of strings using

<p>slice method</p> Signup and view all the answers

Python has built in function that can count the numbers of characters and returns an integer result. You can get the length of a string using the

<p>len function</p> Signup and view all the answers

are use to clean up or remove the extra or unnecessary whitespace characters. Whitespace characters are referred to extra spaces in an object.

<p>strip method</p> Signup and view all the answers

removes spaces on both sides

<p>strip()</p> Signup and view all the answers

removes space on the left side

<p>lstrip()</p> Signup and view all the answers

removes space on the right side

<p>rstrip()</p> Signup and view all the answers

is used to create a list out of a string value. It helps if there is something in the string that can be separated. takes on the argument as a separator and not directly to the string itself.

<p>split method</p> Signup and view all the answers

is used to combine list items to form a string value- object.

<p>join method</p> Signup and view all the answers

is used to take on three arguments: ​ the string you want to replace, the string you want to replace it with, and the number of times the replacement would occur

<p>replace method</p> Signup and view all the answers

are used to change the case of the characters of the string using the following:

<p>case method</p> Signup and view all the answers

it is the value that are enclosed inside the parenthesis when a function is used.​

A parameter is the variable listed inside the parentheses in the function definition.

<p>word bank</p> Signup and view all the answers

Use Quizgecko on...
Browser
Browser