ما الفرق بين الثوابت و المتغيرات في برمجة البايثون؟
الثوابت هي القيم ال
x=7
y=5
x=2
الثابت هو x او y
x هو الثابت
It can be multi line comments?
Python does not really have a syntax for multi line comments.
To add a multiline comment you could insert a # for each line:
What are python fuctions?
A function is a block of code which only runs when it is called.You can pass data, known as parameters, into a function.A function can return data as a result.
What is python lists?
Lists are used to store multiple items in a single variable.
Lists are one of 4 built-in data types in Python used to store collections of data, the other 3 are Tuple, Set, and Dictionary, all with different qualities and usage.
For what is used for?
Why python is imporant?
In order to make easier the way to programm web apps, etc.
What is python data types?
In programming, data type is an important concept.
Variables can store data of different types, and different types can do different things
What are arguments....
Information can be passed into functions as arguments.
Arguments are specified after the function name, inside the parentheses. You can add as many arguments as you want, just separate them with a comma.
What are list items?
List items are ordered, changeable, and allow duplicate values.
List items are indexed, the first item has index [0], the second item has index [1] etc.
Who invented python?
Guido van Rossum
What is python identifiers?
A Python identifier is a name used to identify a variable, function, class, module or other object. An identifier starts with a letter A to Z or a to z or an underscore (_) followed by zero or more letters, underscores and digits (0 to 9).
What is python operators?
Operators are used to perform operations on variables and values.
In the example below, we use the + operator to add together two values:
Arbitrary arguments. args
If you do not know how many arguments that will be passed into your function, add a * before the parameter name in the function definition.
This way the function will receive a tuple of arguments, and can access the items accordingly:
Name the 4 python collections...
What can python do?
What is python comments?
Comments can be used to explain Python code.Comments can be used to make the code more readable.Comments can be used to prevent execution when testing code.
What is Settign data type?
In Python, the data type is set when you assign a value to a variable:
The number of arguments....
By default, a function must be called with the correct number of arguments. Meaning that if your function expects 2 arguments, you have to call the function with 2 arguments, not more, and not less.
When do we say is :ordered:?
When we say that lists are ordered, it means that the items have a defined order, and that order will not change.
If you add new items to a list, the new items will be placed at the end of the list.
Why is it call python?
When he began implementing Python, Guido van Rossum was also reading the published scripts from “Monty Python's Flying Circus”, a BBC comedy series from the 1970s. Van Rossum thought he needed a name that was short, unique, and slightly mysterious, so he decided to call the language Python
Give a example of python comments or pythn syntax?
example... print("Hello, World!") #This is a comment
What is python arithmetic operators?
Arithmetic operators are used with numeric values to perform common mathematical operations
What is recursion?
Python also accepts function recursion, which means a defined function can call itself.
Recursion is a common mathematical and programming concept. It means that a function calls itself. This has the benefit of meaning that you can loop through data to reach a result.