Python 3 Tutorial: 9 - Input

preview_player
Показать описание
This tutorial covers the basics of the input function, and shows how to use the int function as well.
Рекомендации по теме
Комментарии
Автор

The color comes from your IDE (the one used here is IDLE, the one that came with Python) and helps you easily see what kind of words you've typed. For example, orange words are key words that mean something special to Python, like for; and; in; and from.

The print command should be purple and the string should be green.

UmTheMuse
Автор

Thanks you are correct (he also explaines it in tut 14 (or so))

ProxyProof
Автор

a bit like tutorial 8.. I allready followed some C Programming tutorial so, this is really easy for me to get

bboybram
Автор

@EricPCProductions just search for idle 3.2 on the ubuntu software center (that is if u are running ubuntu!)

meanmachinezzz
Автор

Homeschooled, using these to learn. You're really great!

harrytheninga
Автор

You could use eval(input("How tall are you in meters?")). The eval() function evaluates the number as a number (whether it is a float or integer) and will solve your problem.

vballstar
Автор

@nanopavan Actually, raw_input is no longer used in the newer versions of python (3.0 and higher). As of Python 3.0, only input is used. I believe if you try to use raw_input, it will give you an error.

TheMonkeyLords
Автор

Does the color on the text have anything special to do cuz my print is orange..

volbeatowns
Автор

Hey i have a quick question. I am trying to do this but say i want height in meters so i write
h= (int("input (how tall are you in meters?" )
when user then ansers 1.8 or 1, 8 i just get an error (i gues because "." and ", " arent numbers?

ProxyProof
Автор

plese help me i m a begginer programmer and i dont know how to do this

13. Write a program that will ask the user for two numbers a then divide one by the other. The number of times one goes into another and the remainder should be displayed. For example, If 3 and 2 were entered: 3/2 = 1 remainder 1.

yomismo
Автор

I tried doing this and it did not work at all

TransformerCoil
Автор

Doesnt fucking work, when you type "Input()" and then enter something, it just gives a big traceback error

NJLampFilms
Автор

AWESOME VIDEO! i'm a beginner programmer and i'm trying to make a simple program that asks the user to input his "name", and returns his "birthday". Could you please help me with this? thanks!

globalSHARKmeat
Автор

print("This tuts are awesome")

blackchildproduction