1. 程式人生 > >python學習第1天-helloworld

python學習第1天-helloworld

small span src ide nbsp pan == isp cnblogs

一、搭建python運行環境

 1、下載python安裝包

 2、配置好環境變量,可參考此鏈接

二、第一個helloworld

技術分享圖片
1 print ("helloworld");
View Code

三、練習

技術分享圖片
1 add_age = 1;
2 name = input("your name:");
3 age = input("your age:");
4 print("name is "+name+";age is "+str(int(age)+add_age));
View Code

技術分享圖片
1 true_num = 67;
2 input_num = int(input(">>:
")); 3 if true_num==input_num: 4 print(true); 5 elif input_num>true_num: 6 print(try smaller) 7 else: 8 print(try bigger);
View Code

python學習第1天-helloworld