Coding Computing Coach

13.5K posts

Coding Computing Coach banner
Coding Computing Coach

Coding Computing Coach

@CodingComputing

Making Python simple for you, by exploring the fundamentals. Tips and explanations to become code-literate in this AI age. Building @PythonResources

Maximize your coding skills 👇 Katılım Mayıs 2019
104 Takip Edilen8.9K Takipçiler
Sabitlenmiş Tweet
Coding Computing Coach
Coding Computing Coach@CodingComputing·
🚨 Python Testing Series 🚨 Employ testing to gamify your coding. Learn how to test code using pytest. Build a Cash Dispenser project in Test Driven style. Ongoing series of posts, see README at: github.com/CodingComputin…
English
0
1
21
5.5K
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@PythonPr Answer: 20 Solution: x is the integer 10. y is the string "10". However, int(y) converts the string to int. Hence, int(y) gives the value 10. So, x + int(y) simplifies to 10 + 10 that gives 20.
English
0
1
11
516
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@clcoding it forces the int 10 to its float type before comparison. 10 converted to float is 10.0. 10 == 10.0 thus simplifies to 10.0 == 10.0 which works out to be True, and that's what gets printed.
English
0
0
0
79
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@clcoding Answer: True Solution: We are checking equality of two values here: 10 and 10.0 Notice their data types: 10 is an int. 10.0 is a float. Now, if we check the equality among 10 and 10.0, python is smart enough to know that both these are numeric types. So, +
English
1
0
6
624
Python Coding
Python Coding@clcoding·
What will be the output of the following Python code? print(10 == 10.0)
English
11
6
42
20.6K
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@PythonPr Answer: D Solution: score is initialized to 90. Let's now go through the if-elif-else ladder. The if-condition is score > 90 Because the value of score is 90, this condition is False. That is because it is > and not >= So we go the elif score>=90 and score<90 +
English
0
0
1
141
Python Programming
Python Programming@PythonPr·
What will This Code Print? Write Me Your Thoughts Here!
Python Programming tweet media
English
31
12
116
11.8K
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@PythonPr Answer: A Solution: The main part is to figure out what the loop is over. range(0, 5, 2) produces a sequence of numbers - starting from 0 - up to, but excluding 5 - with increments of 2 So, the items in the range are: 0, 2, 4. Note that 6 won't be in there, as it's >=5. +
English
1
1
6
492
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@PythonPr So, i takes values 0, 2, 4 within the loop. x is initialized to 0. In the 1st iteration, i=0 is added to x. It remains 0. In the 2nd iteration, i=2 is added to x, making it 2. In the 3rd iteration, i=4 is added to x, making it 6. The loop ends. The value of x, 6 is printed.
English
0
0
1
55
Python Programming
Python Programming@PythonPr·
90% of the beginners will answer this wrongly🤯🤯 Comment your answer 👇
Python Programming tweet media
English
27
2
99
13.1K
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@PythonPr Answer: world Solution: n is initialized to the value 20. Then, there is an if-statement with an equality check condition. It compares n with 15. Since n is 20, the condition is False. Therefore the else-block is executed. That prints world.
English
0
0
1
142
Python Programming
Python Programming@PythonPr·
Python Quiz: What is the output of the following Python code?
Python Programming tweet media
English
34
3
75
10.5K
Coding Computing Coach
Coding Computing Coach@CodingComputing·
The quick bug fixes take the longest. The temporary fixes live in the codebase the longest.
English
0
0
0
336
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@PythonPr the fraction rounded down. Eg. 10 // 5 gives 2 (not 2.0 like / would) 14//5 also gives 2 (not 2.8 like / would) -14//5 gives -3 (not -2.8 like / would, and we round down)
English
0
0
0
43
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@PythonPr Answer: A Solution: There are 2 division operators in Python, / and //. / is regular division. It gives back a float, even if the operands are ints. // is floor division. It returns what we call "quotient". It gives back an int if the operands are ints. The value is +
English
1
0
2
169
Coding Computing Coach
Coding Computing Coach@CodingComputing·
Thank you Windows Update for pushing me to try Linux.
English
0
1
4
250
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@emollick @karpathy rightly says that while learning, the primary feeling should be that of effort. He said it for YouTube content, but the point still stands. Taking shortcuts is suboptimal for learning.
English
0
1
2
220
Ethan Mollick
Ethan Mollick@emollick·
More evidence, from a large-scale study in China, that using AI hurts learning if it undermines mental effort. When homework time drops due to AI use, so do test scores. Across studies, a theme: AI tutoring in support of classes is good, using AI to "help" with homework is bad.
Ethan Mollick tweet mediaEthan Mollick tweet mediaEthan Mollick tweet media
English
60
189
1K
113.1K
Coding Computing Coach
Coding Computing Coach@CodingComputing·
@bendee983 @karpathy rightly says that while learning, the primary feeling should be that of effort. He said it for YouTube content, but the point still stands. Taking shortcuts is suboptimal for learning.
English
1
0
2
213
Ben Dickson
Ben Dickson@bendee983·
One of the effects of AI that is not discussed enough is the threat of cognitive laziness. I'm seeing it happen in real time. Everything is being reduced to an LLM prompt. People stop thinking and learning as they relegate everything to AI. First, you review the AI's response with skepticism. Eventually, a lot of people become overwhelmed with AI fatigue and just accept whatever the LLM generates, whether it is an article, an email, a software module. I see it every day in my inbox, in arXiv papers that have clear signs of AI output, in code that is awfully written. People start trusting the AI for everything and stop thinking. It remains to be seen what the long-term effect of this laziness will be. But it surely won't make us smarter.
Ethan Mollick@emollick

More evidence, from a large-scale study in China, that using AI hurts learning if it undermines mental effort. When homework time drops due to AI use, so do test scores. Across studies, a theme: AI tutoring in support of classes is good, using AI to "help" with homework is bad.

English
8
68
251
11.7K