Oracle PL/SQL practice exercises #01 with solutions
HTML-код
- Опубликовано: 24 авг 2024
- Hello everyone, welcome back to our channel. In thus video, we're going to learn how to calculate the perimeter of a circle using PL/SQL programming language. It's going to be a simple and straight forward process, so let's dive right into it.
01) Write a simple PL/SQL program to calculate the perimeter of a circle with radius=5 cm (Note: Take pi value as 3.14)
Let me walk you through the PL/SQL code we have here. We start by declaring a variable named 'radius' and assigning it a value of 5. This represents the radius of our circle. Then, we declare a constant named 'pi' and assign it a value of 3.14, which is a commonly used approximation of the mathematical constant π.
Next, we declare another variable named 'perimeter' which will hold the calculated perimeter of the circle. In the BEGIN block, we calculate the perimeter using the formula: perimeter = 2 * pi * radius.
Once the calculation is done, we use the DBMS_OUTPUT.PUT_LINE function to display the result. It will show us the perimeter of the circle with a radius of 5 cm.
Now, let's execute the code and see the result.
"The perimeter of the circle with radius 5 cm is: 31.4 cm"
As you can see, the perimeter of the circle with a radius of 5 cm is calculated to be 31.4 cm.
And there you have it! That's how you can calculate the perimeter of a circle using PL/SQL. I hope you found this video helpful. If you did, don't forget to give it a thumbs up and subscribe to our channel for more tutorials like this. Thanks for watching and see you in the next video!
🔵OraclePLSQL_SkillBuilder here
◼️github.com/Ime...
************************************************
🔰Other Playlist
◼️ Data Science - • Data Science
◼️ Projects Beginner to Advanced - • Projects Beginner to A...
◼️ React Beginner to Advanced - • React Beginner to Adva...
◼️ Psychology - • Psychology
◼️ Motivational - • Motivational
◼️ Short Story - • Short Story
◼️ Nature - • Nature
🔰 Follow me:
✔ TikTok: www.tiktok.com...
✔ Medium: / imeshadilshani212
✔ LinkedIn: / imesha-dilshani-61862422b
✔ GitHub: github.com/Ime...
🔰 Contact me:
✔ Email: imeshad205@gmail.com
✔ WhatsApp Group: chat.whatsapp....
🔰 Support me: youtube.com/@M...
Listen to your heart...be happy...don't give up and always believe!
👍 Thanks so much for watching! Make sure to LIKE + SUBSCRIBE for more! ❤️
Your support means the world to me. Let's keep supporting each other on this amazing journey! ❤
🔔 Subscribe For More!
🔰Related Tags
#plsql #sql #databse #sqlpractice
oracle sql practice exercise,sql practice exercises with solutions,sql practice questions,sql practice problems,oracle sql,oracle sql practice exercises,oracle interview questions,oracle sql interview questions for developers,sql practical examples,sql practice questions for data analysis,oracle fresher interview questions,oracle,sql practical interview questions,sql practice exercise,sql practical tutorial,oracle pl sql interview questions, practice SQL,