PythonDQ

154 posts

PythonDQ

PythonDQ

@PythonDQ

Python Daily Quiz (PythonDQ)

x.com 가입일 Mayıs 2024
83 팔로잉169 팔로워
PythonDQ
PythonDQ@PythonDQ·
@512x512 Improve Grok by adding audio and video to Grok's responses. If user asks Grok to teach them how to sous vide a 5 pound prime rib roast, Grok returns step-by-step instructions via text and via video with audio. Audible, visual, and readable instructions help. @512x512 @elonmusk
English
0
0
1
16
Yaroslav
Yaroslav@512x512·
Have you used ChatGPT, Claude or Perplexity today? How can we improve Grok to make you switch?
English
10.2K
412
8.3K
21.9M
PythonDQ
PythonDQ@PythonDQ·
Improve this Bubble Sort Algorithm: @mjovanc
PythonDQ tweet media
English
0
0
0
103
PythonDQ
PythonDQ@PythonDQ·
Improve this Bubble Sort Algorithm
PythonDQ tweet media
English
1
2
9
2.5K
PythonDQ
PythonDQ@PythonDQ·
@itsmeivoo Clear and concise communication in both writing and speaking.
English
0
0
0
23
Ivo Ribeiro
Ivo Ribeiro@itsmeivoo·
What’s the most underrated skill for someone to learn?
English
480
15
335
64.8K
PythonDQ
PythonDQ@PythonDQ·
What is output of following Python Code? num = 15 if num % 2 == 0: print("Even") else: print("Odd") a) Even b) Odd c) Error d) No output
English
6
0
11
2.1K
PythonDQ
PythonDQ@PythonDQ·
What is the output of the Python code? x = 20 if x < 10: print("Less than 10") elif x < 20: print("Less than 20") elif x < 30: print("Less than 30") else: print("30 or more") a) Less than 10 b) Less than 20 c) Less than 30 d) 30 or more
English
15
3
19
3.7K
PythonDQ
PythonDQ@PythonDQ·
What is output of the Python code? y = 8 if y > 10: print("y is greater than 10") elif y < 10 and y > 5: print("y is between 5 and 10") else: print("y is 5 or less") a) y is greater than 10 b) y is between 5 and 10 c) y is 5 or less d) Error
English
19
1
14
2.7K
PythonDQ
PythonDQ@PythonDQ·
What is the output of the Python code? x = 10 if x > 5: print("x is greater than 5") elif x == 10: print("x is 10") else: print("x is less than or equal to 5") a) x is greater than 5 b) x is 10 c) x is less than or equal to 5 d) No output
English
12
0
11
2.4K
PythonDQ
PythonDQ@PythonDQ·
Output of following Python code? my_dict = {'a': 1, 'b': 2, 'c': 3} new_dict = {} for key in my_dict: new_dict[key] = my_dict[key] ** 2 print(new_dict) a) {'a': 1, 'b': 4, 'c': 9} b) {'a': 1, 'b': 2, 'c': 3} c) {'a': 2, 'b': 3, 'c': 4} d) {'a': 1, 'b': 2, 'c': 3, 'd': 4}
English
6
1
7
708
PythonDQ
PythonDQ@PythonDQ·
What will be the output of the following Python code and why? dict = {'a': 1, 'b': 2, 'c': 3} print(1 in dict) a) True b) False c) None d) Error
English
3
0
5
917
PythonDQ
PythonDQ@PythonDQ·
dict = {'a': 1, 'b': 2, 'c': 3} for value in dict.values(): print(value, end=' ') a) 1 2 3 b) a b c c) {'a': 1, 'b': 2, 'c': 3} d) None
English
5
1
11
1.5K
PythonDQ
PythonDQ@PythonDQ·
What will be the output of the following Python code? my_dict = {'a': 1, 'b': 2, 'c': 3} for key in my_dict: print(key, end=' ') print() a) a b c b) 1 2 3 c) a: 1 b: 2 c: 3 d) a b c 1 2 3
English
7
2
9
2.1K
PythonDQ
PythonDQ@PythonDQ·
What will be the output of the following Python code? my_dict = {'a': 1, 'b': 2, 'c': 3} for key, value in my_dict.items(): if value % 2 == 0: print(key) a) a b) b c) c d) a, c
English
10
2
7
2.4K
PythonDQ
PythonDQ@PythonDQ·
What will be the output of the following Python code? s = {1, 2, 3, 4} print(sum(s)) a) 10 b) 4 c) An error message d) None of the above
English
4
1
8
1.8K
PythonDQ
PythonDQ@PythonDQ·
What will be the output of the following Python code? s = {1, 2, 3, 4} for i in range(5): if i in s: continue else: print(i) a) 0 b) 4 c) 0, 4 d) No output
English
6
0
7
1.2K
PythonDQ
PythonDQ@PythonDQ·
In Python, which of the following set operations is equivalent to set1.difference(set2)? a) set1 - set2 b) set1 | set2 c) set1 & set2 d) set1 ^ set2
English
4
1
9
662