Python Basics: Challenge 1 Example Solution, Importing in Python

preview_player
Показать описание

Challenge was about implementing simple program that change inches into centimetres. You will learn what the refactoring is and how to import functions that are in a different Python file. I will also show you a "format" method that is very useful for displaying texts.

Video with the challenge:

My social media:
Рекомендации по теме
Комментарии
Автор

I'm a boy and I profoundly admire the way you made OO programming concepts as easy and concise as that

mountassir
Автор

Well, im really a beginner and i did it like this :))

number1=float(input("enter your number:"))
number2=2.54
result=number1*number2
print("You entered number", cislo1, "in inch is", result, "in centimeters")

Vernka
Автор

Thanks for making these videos as they were the starting point of where I am. Hoped if u could have continued but good luck for wherever u r.

nitinsingh
Автор

Thank you Ola. You are one of the best youtube teachers. I'm learning so much.

paraglide
Автор

Hi! Your videos are amazing and really inspiring. It must be a lot of work, but please keep going, it really has revolutionized coding for me! I had almost given up trying to get help from youtube, since most "introduction" videos start on a level waaaay above where I am..
You said you wanted comments on what I struggled with when doing the challenge.. Well, in this exercise, I thought I had to use a function to get the code to work. And in the solution I see that this was not neccessary. So I have clearly a long way to go before I understand when to use what kind of code. So these types of exercises are wonderful! Especially when you give good solutions in the next video.

ragnifjellgaardmikalsen
Автор

I'm binge-watching your videos) thanks for all the time and effort you put into it - it is appreciated!
Dziękuję Ci)

SergeyFM_ru
Автор

nice video .. u really deserve alot more subscribers ! keep on going and never give up !

ziyadkader
Автор

Really enjoy your videos, you are making such a good job mixing between coding and art in your video, it's the perfect dual, wish you best of luck for future videos.

ilyeshammadi
Автор

found this video so helpful! thank you!

saya
Автор

try:
numero = float(input("Por favor informe um numero: "))
except ValueError:
print("esse nao eh um numero, rode de novo")

polegadas = 1
centrimetros = 2.54

if numero.is_integer():
print("O numero", numero, "equivale a ", numero * centrimetros, "em Polegadas")
else:
print("O numero", numero, "equivale a ", numero / centrimetros, "em Centimetros")

pexao