Cerca

Heus ací els resultats de la cerca.

1.7 Four magic letters: CRUD @info:cursos:pue:python-pcpp1:m4
16 Resultats, Darrera modificació:
'Camaro', 'production_year': 1988, 'convertible': True}, {'id': 3, 'brand': 'Aston Martin', 'model': 'Ra... 300SL', 'production_year': 195 q7, 'convertible': True}] </code> Note the line starting with ''applicat... hevrolet | Camaro | 1988 | True | 3 | Aston Martin | Rapide ... ercedes Benz | 300SL | 1957 | True | </code> If you don't need all the
2.6 Abstract classes @info:cursos:pue:python-pcpp1:m1
6 Resultats, Darrera modificació:
on = 300 self.printer_operation_history = True self.fax_machine = False def high(se... on = 600 self.printer_operation_history = True self.fax_machine = True def scan_document(self): print("El document ha est... on = 300 self.printer_operation_history = True self.fax_machine = False class MFD3(MFD,
4.1 Shallow and deep copy operations @info:cursos:pue:python-pcpp1:m1
6 Resultats, Darrera modificació:
alues could be compared, and the result would be 'True'. Moreover, when you compare two variables referencing the same object, the result would be also 'True'. To check whether both operands refer to the sa... tity: 3687888 The result of the value comparison: True The result of the identity comparison: True a_string identity: 3689048 b_string identity: 9418632 The
2.4 Shaping the main window and conversing with the user @info:cursos:pue:python-pcpp1:m3
6 Resultats, Darrera modificació:
-= 50 if size <= 100: grows = True window.geometry(str(size) + "x" + str(size)) size = 100 grows = True window = tk.Tk() window.geometry("100x100") windo... ues, not integer values. Their meaning is: * ''True'' – the user can change this dimension; * ''Fal... n** with a **question** mark in it; * returns ''True'' if the user’s response is //Yes// and ''False''
1.4 Talking to JSON in Python @info:cursos:pue:python-pcpp1:m4
4 Resultats, Darrera modificació:
? <code python> import json my_list = [1, 2.34, True, "False", None, ['a', 0]] print(json.dumps(my_lis... all! The code prints: <code ; output> [1, 2.34, True, "False", null, ["a", 0]] </code> We want to ask... ook: <code python> import json jstr = '[1, 2.34, true, "False", null, ["a", 0]]' my_list = json.loads(j... prints: <code ; output> <class 'list'> [1, 2.34, True, 'False', None, ['a', 0]] </code> We expect that
2.2 Inheritance and polymorphism — Inheritance as a pillar of OOP @info:cursos:pue:python-pcpp1:m1
3 Resultats, Darrera modificació:
may only have one superclass — this is not always true, but we'll discuss this issue more a bit later. ... __', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'bit_length', 'con
2.5 Different faces of Python methods @info:cursos:pue:python-pcpp1:m1
3 Resultats, Darrera modificació:
): if len(iban) == 20: return True else: return False </code> ... ): if len(iban) == 20: return True else: return False account_... t) <= 40 and text.isalnum(): retorn = True return retorn try:
2.9 Inheriting properties from built-in classes @info:cursos:pue:python-pcpp1:m1
3 Resultats, Darrera modificació:
Error("IBAN entered is invalid.") return True test_keys = ['GB72 HBZU 7006 7212 1253 01', 'FR... orrectly formulated account number; * returns a True value when the account number conforms to all IBA... Error("IBAN entered is invalid.") return True my_dict = IBANDict() keys = ['GB72 HBZU 7006 72
2.1 PEP 20 – The Zen of Python @info:cursos:pue:python-pcpp1:m2
3 Resultats, Darrera modificació:
("A" > "a") print(1.0 == 1) print("1" == 1) print(True == "1") print(True == 1) print(True == 1.0) print("1" + "1") print(1 + 1) print(1 + "1") </code> Do you know the result o
3.1 PEP 8 – Introduction @info:cursos:pue:python-pcpp1:m2
3 Resultats, Darrera modificació:
uality operators when comparing Boolean values to True or False. Again, use is or is not instead: <code ... my_boolean_value = 2 > 1 if my_boolean_value == True: print("A") else: print("B") </code> <co... my_boolean_value = 2 > 1 if my_boolean_value is True: print("A") else: print("B") </code> <cod
4.1 PEP 257 – Docstring Conventions @info:cursos:pue:python-pcpp1:m2
3 Resultats, Darrera modificació:
. is_autonomous: bool self-driving -> True, not self-driving -> False Methods: ... it__(self, vehicle_type, id_number, is_autonomous=True): """ Parameters: -------... omous: bool, optional self-driving -> True (default), not self-driving -> False """
1.3 JSON – our new friend @info:cursos:pue:python-pcpp1:m4
3 Resultats, Darrera modificació:
specific identifiers (the literal name tokens): **true** and **false**: <code ruby> true false </code> Note: you have to **preserve the case of the literals*... 3.0857E16, electron: −1.6021766208E−19 friend: "JSON", off: true, on: false, set: null } </code>
2.1 Python core syntax @info:cursos:pue:python-pcpp1:m1
2 Resultats, Darrera modificació:
__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'bit_length', 'con
3.1 Advanced techniques of creating and serving exceptions @info:cursos:pue:python-pcpp1:m1
2 Resultats, Darrera modificació:
d: list index out of range Is it the same object: True </code> The ''except Exception'' clause is a wid... d: list index out of range Is it the same object: True </code> == Advanced exceptions - explicitly chai
5.1 Metaprogramming @info:cursos:pue:python-pcpp1:m1
2 Resultats, Darrera modificació:
e argument: <code python> for element in (1, 'a', True): print(element, 'is', element.__class__, typ... '> <class 'int'> a is <class 'str'> <class 'str'> True is <class 'bool'> <class 'bool'> </code> When th
1.6 Events and how to handle them @info:cursos:pue:python-pcpp1:m3
2 Resultats, Darrera modificació:
2.1 File processing - XML files @info:cursos:pue:python-pcpp1:m5
2 Resultats, Darrera modificació:
2.7 Encapsulation @info:cursos:pue:python-pcpp1:m1
1 Resultats, Darrera modificació:
1.2 Let TkInter speak! @info:cursos:pue:python-pcpp1:m3
1 Resultats, Darrera modificació:
1.8 Interacting with widget methods @info:cursos:pue:python-pcpp1:m3
1 Resultats, Darrera modificació:
2.5 Working with the Canvas @info:cursos:pue:python-pcpp1:m3
1 Resultats, Darrera modificació:
1.2 How to use sockets in Python @info:cursos:pue:python-pcpp1:m4
1 Resultats, Darrera modificació: