GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Notizen

Python chapter 1/part 1

yomum 21 programming tech rocket nothing Englisch 3 Seiten

Python chapter 1/part 1

Inhalt der Notizen (3)

Seite 1

defentiions

print()=show text on screen e.g. print("hi world")

variable: A container that can hold a single word, number, or other info

e.g:

Python chapter 1/part 1

Python chapter 1/part 1

e.g. scoops_of_ice_cream=5

print(scoops_of_ice_cream)

Python chapter 1/part 1

e.g. scoops="5 scoops for"

people="5,000 people"

print(scoops + people)

Data types=driffrents types of data that a varriable can store

String Data types:

Python chapter 1/part 1

Seite 2

Use "" with string data types

Numeric data types: numbers used in program

operators: symbol that perform a single type of action.

Comparsion operators= produce bolean results and are e.g.

bolean results: results that are yes and no

Logical operators: Things important in all programming languages. logical operators in python:

Python chapter 1/part 1

Seite 3

e.g. print(10 > 5 and 10 < 20) is true.

not operator eg: print(not(10>20))

single-line comments=lines of code that are not run in python and used with a #

e.g.

#debug code

print(HIYA)

Multi-line comments= used for more than one line. Can be used to explain and do headings for a program like Name, project name, last updated etc.

e.g.

"""

Can u please add the print stament to print

Can u also please configure the settings to have a quality setting

"""

or

"""

Seb W.V.

Private Owned Corp.

Example project

Example.py

"""

Debuging=fixed bugs or errors in the program.

Random command= displays a random number. Needs to be imported

code:

first input random

then anywhere else in code random.random

e.g.

Input random

cargo=random.random()

randge range= random coamand with a range

e.g.

input random

random.randrange(1,11)

range start range end(displays it number-1)

input=python's built in commands and can be used out of the box. Used to ask for user input

e.g.

guess=input(guess the number)

casting: taking input and putting it into driffrent values

int=abbrieation for a interger

Informationen

Beschreibung
nothing programming tech rocket (Python) Notiz am Python chapter 1/part 1, erstellt von yomum 21 am 17/07/2016.
Erstellt von
yomum 21
Aufrufe
49
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck