What will be the output of the code
Anonymous Quiz
9%
5
24%
6
34%
9
9%
12
19%
Error
5%
None of these
👍6
What will be the output of the code?
❌ 5
❌ 6
✅ 9
❌ 12
❌ Error
❌ None of the above
Explanation:
The function my_func takes two arguments, x and y, with a default value of 2 for y. The function returns the value of x raised to the power of y.
In the code snippet, my_func is called with the argument 3, but no value is specified for y, so the default value of 2 is used. Therefore, my_func calculates and returns 3 ** 2, which equals 9.
As a result, the correct answer is 9.
❌ 5
❌ 6
✅ 9
❌ 12
❌ Error
❌ None of the above
Explanation:
The function my_func takes two arguments, x and y, with a default value of 2 for y. The function returns the value of x raised to the power of y.
In the code snippet, my_func is called with the argument 3, but no value is specified for y, so the default value of 2 is used. Therefore, my_func calculates and returns 3 ** 2, which equals 9.
As a result, the correct answer is 9.
👍9
👍7👏5😁2
Which language are you learning now ?
Anonymous Poll
15%
C
20%
JAVA
10%
C++
46%
Python
5%
Javascript
3%
Others
👍10🥰5😁5👏1
👍2
⚡️ Roadmap to become a full stack developer in 2023
- Learn basics:
🎯 HTML
🎯 CSS
🎯 JavaScript/Typescript
🎯 Git
🎯 Github
- Learn a framework:
🎯 React/Angular/Vue/Svelte
🎯 TailwindCSS/Bootstrap
- Backend:
🎯 NodeJs/Python/Rust
🎯 MongoDb/PostgreSQL/MySQL
🎯 AWS/Heroku
- Learn basics:
🎯 HTML
🎯 CSS
🎯 JavaScript/Typescript
🎯 Git
🎯 Github
- Learn a framework:
🎯 React/Angular/Vue/Svelte
🎯 TailwindCSS/Bootstrap
- Backend:
🎯 NodeJs/Python/Rust
🎯 MongoDb/PostgreSQL/MySQL
🎯 AWS/Heroku
👍10❤5