Solutions to my exercises on Python Programming (Part 1).

in #steemiteducation7 years ago (edited)

thought-2123970__480 (1).jpg
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:

  1. Ask the user to enter a number, then print out the square of the number.
  2. 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.

  1. Write a code that prompts the user to enter a number.
    IMG_20180403_215327_300.jpg
  2. Write a code that prints the square of the number. Here's an example.
    IMG_20180402_212402_249.jpg

Solution to exercise 2.

  1. Write a code that prompts a user to enter the weight in kilograms.e. g
    IMG_20180403_214724_027.jpg
  2. Print out the weight in pounds using the conversion of.
    1 kilogram = 22 pounds.
    Here's an example.
    IMG_20180403_221701_785.jpg

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.

  1. Python programming tutorial 1 — (Installing Python, getting user Inputs and running basic programs)
  2. My new Steemit project and how I intend to run it.
  3. 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.

Sort:  

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

Coin Marketplace

STEEM 0.21
TRX 0.25
JST 0.039
BTC 95276.42
ETH 3297.99
USDT 1.00
SBD 3.16