Python

¡Supera tus tareas y exámenes ahora con Quizwiz!

same

And you can assign the ______ value to multiple variables in one line:

bytes, bytearray, memoryview

Binary Types:

bool

Boolean Type:

format () method

But we can combine strings and numbers by using the format() method!

#

Comments start with a ____, and Python will render the rest of the line as a comment:

Global

If you use the _______ keyword, the variable belongs to the global scope: Syntax: def myfunc(): global x x = "fantastic" myfunc() print("Python is " + x) Try it Yourself »

int, float, complex

Numeric Types:

You can execute code based on the Boolean answer of a function

Please explain this Boolean

web development (server-side), software development, mathematics, system scripting.

Python is used for:

block of code

Python uses indentation to indicate a _____ of _____.

A variable name must start with a letter or the underscore character. cannot start with a number.

Rules for Python variables:

list, tuple, range

Sequence Types:

set, frozenset

Set Types:

1

String arrays What position is the word world in ?

str

Text Type:

Print

The Python ______ statement is often used to output variables.

+

To combine both text and a variable, Python uses the ___ character: syntax: x = "awesome" print("Python is " + x)

len () function

To get the length of a string, use the ____() _______

type () function

To verify the type of any object in Python, use the ____() function. Example Syntax: print(type(x)) print(type(y)) print(type(z))

escape characters

What are these characters called?

Append () method and it adds a item to the end of the list

What does this method do an what is it called?

It Merges variable a with variable b into variable c

What does this method do?

It replaces one string with another. replace()

What does this method do?

To add a space between them, " "

What does this method do?

Four python data type list (arrays)

What is this list called?

It's called the range of indexs, and it will print the start to the end of the specific range.

What is this syntax called? And what does it do?

slice syntax

What syntax is this?

False

What will the following return back?

exit

Whenever you are done in the python command line, you can simply type the following to quit the python command line interface:

Three quotations marks

You can assign a multiline string to a variable by using ____ ______

Set

______ is a collection which is unordered and unindexed. No duplicate members.

Dictionary

______ is a collection which is unordered, changeable and indexed. No duplicate members.

Complex

______ numbers are written with a "j" as the imaginary part: Example syntax: x = 3+5j y = 5j z = -5j print(type(x)) print(type(y)) print(type(z))

Python

______ uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses.

Variables

________ are containers for storing data values.

Tulpe

_______is a collection which is ordered and unchangeable. Allows duplicate members.

complex

What type of numeric type is this? z = 1j

Assignment Operators

What type of operators are these?

Bitwise

What type of operators are these?

slice index

You can return a range of characters by using the _____ _____

Python

____ can be used to handle big data and perform complex mathematics.

List

_____ is a collection which is ordered and changeable. Allows duplicate members.

Float

_____ is a number, positive or negative, containing one or more decimals.

Negativity indexes

______ _______ if you want to start the search from the end of the list

Operators

______ are used to perform operations on variables and values.

Python

______ has no command for declaring a variable. A variable is created the moment you first assign a value to it.


Conjuntos de estudio relacionados

Chapter 1 Auditing IT Infrastructures for Compliance

View Set

Chapter 04 The Way the Earth Works: Plate Tectonics guided learning

View Set

Chapter exam uses of life insurance

View Set

World History Midterm Study Guide The Reformation

View Set

Unit 4: The Renaissance & Reformation

View Set

Life Policy Provisions, Riders and Options

View Set

Fluids and Electrolytes, Acids and Bases - Adaptive Quiz

View Set

Unit 22 and 23 Respiration System Quiz Questions

View Set