Loading...
「ツール」は右上に移動しました。
利用したサーバー: wtserver1
0いいね 11 views回再生

How to Use Basic Data Types in Python - 60 Seconds to Code

Welcome to 60 `seconds to code where I show you how to code in 60 seconds or less.
Today you will learn about some basic data types that you can assign to variables
Step 1 – In a new file called datatypes1.py In the first line write a = 5. In the second line
write b = 6 and in the third line type print(a+b)
Step 2 – In the fourth line type c=1.1, in the fifth line type d=1.2 and in the sixth line
type print(c+d)
Step 3 – In the 7th line type e = True, in the 8th line type f = not e, 9th line type
print(e) and in line 10 type print(f)
Step 4 – Save and then run the file from the terminal
Congratulations, you’ve learned how to assign integers, floats and Booleans as data types to variables
Try to code a little every day because CODE IS LIFE
#tutorial on #howto assign variable to different data types in your #python program. #60secondstocode #codeislife

コメント