پایتون ( Machine Learning | Data Science )
23.7K subscribers
488 photos
60 videos
104 files
350 links
◀️اینجا با تمرین و چالش با هم پایتون رو یاد می گیریم

بانک اطلاعاتی پایتون
پروژه / code/ cheat sheet
+ویدیوهای آموزشی

+کتابهای پایتون
تبلیغات:
@alloadv

🔁ادمین :
@maryam3771
Download Telegram
پایتون ( Machine Learning | Data Science )
What is the value of L at the end of execution of the program?
Explanation:
The for loop will run for i = 0 to i = 3, i.e. 4 times(len(L) = 4). 2e-04 is same as 0.0002, thus L[i] = 6.22 + 0.0002 = 6.2202. String addition will result in concatenation, ‘a’ + ‘boy’ = ‘aboy’. False + True is True, it’ll return the integer value of 1. As tuples are immutable, the code will end with TypeError, but elements of L will be updated.


#code #test

🆔 @Python4all_pro
👍8😍1
⁉️ تمرین  : به نظر شما گزینه درست کدومه ؟

#code #test

🆔 @Python4all_pro
⁉️ تمرین  : به نظر شما گزینه درست کدومه ؟

#code #test

🆔 @Python4all_pro
⁉️ تمرین  : به نظر شما گزینه درست کدومه ؟

#code #test

🆔 @Python4all_pro
⁉️ تمرین  : به نظر شما گزینه درست کدومه ؟

#code #test

🆔 @Python4all_pro
👍4🆒1
⁉️ تمرین  : به نظر شما گزینه درست کدومه ؟

#code #test

🆔 @Python4all_pro
🆒2👍1
⁉️ تمرین  : به نظر شما گزینه درست کدومه ؟

#code #test

🆔 @Python4all_pro
👍3
⁉️ تمرین  : به نظر شما گزینه درست کدومه ؟

#code #test

🆔 @Python4all_pro
🙏1🆒1
پایتون ( Machine Learning | Data Science )
⁉️ تمرین  : به نظر شما گزینه درست کدومه ؟ #code #test 🆔 @Python4all_pro
Explanation:
The code defines a decorator function decorator that takes a function func as an argument and returns a wrapper function. The wrapper function is responsible for performing some additional actions before and after the execution of func.

The @decorator syntax is used to decorate the my_function function with the decorator function. This means that when my_function is called, it will be wrapped by the wrapper function defined in the decorator function.

When my_function(3, 5) is called, the decorator function's wrapper function is executed. It prints "Before function execution", then calls my_function with the provided arguments and stores the result in the result variable. After that, it prints "After function execution" and returns the result.

Finally, the value of result is printed to the console, which will be the sum of the arguments passed to my_function, resulting in the output "8".

Therefore, the correct answer is option 😎 Before function execution, 8, After function execution. The program will output those three lines in the given order.


#code #test

🆔 @Python4all_pro
❤‍🔥1👾1
⁉️ تمرین  : به نظر شما گزینه درست کدومه ؟

#code #test

🆔 @Python4all_pro
👍4😍2
⁉️ تمرین  : به نظر شما گزینه درست کدومه ؟

#code #test

🆔 @Python4all_pro
👍31
⁉️ تمرین  : به نظر شما گزینه درست کدومه ؟

#code #test

🆔 @Python4all_pro
😍41👍1