Solutions to my exercises on Python Programming (Part 1).
Hello guys! In my last class on programming, I gave an exercise to try so you could strengthen your knowledge on what I just taught. First of all let me congratulate all of you who got the right codes for the program. And don't feel bad or discouraged if you didn't get it right, as I'm here now to break it down.
EXERCISES:
- Ask the user to enter a number, then print out the square of the number.
- Write a program that asks the user for a weight in kilograms, then convert it to pounds. There are 22 pounds in a kilogram.
Solution to exercise 1.
- Write a code that prompts the user to enter a number.
- Write a code that prints the square of the number. Here's an example.
Solution to exercise 2.
- Write a code that prompts a user to enter the weight in kilograms.e. g
- Print out the weight in pounds using the conversion of.
1 kilogram = 22 pounds.
Here's an example.
Thanks for reading! I hope you all love it? If you love it or not , either the case may be feel free to pour out your mind.
If you have no idea of what's going on here. Well this is the solution to the exercises I gave in my last class on Python programming. If you're interested, you can join as it's not too late. And if you get confused on the way, you can also ask questions in the comments section of any of posts, preferably recent post and get help from the community.
My most recent programming articles.
- Python programming tutorial 1 — (Installing Python, getting user Inputs and running basic programs)
- My new Steemit project and how I intend to run it.
- Top 3 reasons why everyone should learn programming.
To get more programing tutorials, tips and technological updates you won't want to miss out, subscribe to my Steemit page by following @edywill.
Your Post Has Been Featured on @Resteemable!
Feature any Steemit post using resteemit.com!
How It Works:
1. Take Any Steemit URL
2. Erase
https://
3. Type
re
Get Featured Instantly & Featured Posts are voted every 2.4hrs
Join the Curation Team Here | Vote Resteemable for Witness