返回列表 發帖

變數宣告與基本輸出 (一)

  1. a=123
  2. b=456
  3. print(a,"python",b)
  4. print(a,"python",b,sep="~")
  5. print(a,"python",b,sep="~",end="!!!\n")
  6. print(str(a)+"~python~"+str(b)+"!!!")
複製代碼
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

  1. #12345
  2. "123456"
  3. """
  4. 123456
  5. """
  6. a=123
  7. b=456
  8. c="★"
  9. print(a,"HI",b,sep="★",end="?\n")
  10. print(str(a)+"abc"+str(b)+c)
  11. print(1,2,3,4,5,6,7,8,9,10,sep="+",end="=55")
複製代碼

TOP

  1. x=123
  2. y=456
  3. print(x,"python",y)
  4. print(x,"python",y,sep="~")
  5. print(x,"python",y,sep="~",end="!!!\n")
  6. print(str(x)+"~python~"+str(y)+"!!!")
複製代碼

TOP

  1. a=123
  2. b=456
  3. print(a,"python",b)
  4. print(a,"python",b)
  5. print(a,"python",b,sep="~",end="!!!\n")
  6. print(a,"python",b,sep="~",end="!!!\n")
複製代碼
陳頡鴻

TOP

  1. a=123
  2. b=456
  3. print(a,"python",b,)
  4. print(a,"python",b,sep="~")
  5. print(a,"python",b,sep="~",end="!!!\n")
  6. print(a,"python",b,sep="~",end="!!!")
複製代碼

TOP

  1. a=123
  2. b=456
  3. print(a,"python",b)
  4. print(a,"python",b,sep="~")
  5. print(a,"python",b,sep="~",end="!!!\n")
  6. print(str(a)+"~python~"+str(b)+"!!!")
複製代碼

TOP

  1. # -*- coding: utf-8 -*-
  2. """
  3. Spyder Editor

  4. This is a temporary script file.
  5. """

  6. print("hello world")

  7. a=120
  8. b=69

  9. print(a,"apple",b,)

  10. print (a,"kenny",b,sep="-",end="$")
複製代碼

TOP

  1. a=100
  2. b=20
  3. print(a,"python",b)
  4. print(a,"python",b,sep="~")
  5. print(a,"python",b,sep="~",end="!!!\n")
  6. print(str(a)+"~python~"+str(b)+"!!!")
複製代碼

TOP

  1. # -*- coding: utf-8 -*-

  2. a=123
  3. b=456
  4. print(a,"python",b)
  5. print(a,"python",b,sep="~")
  6. print(a,"python",b,sep="~",end="!!!\n")
  7. print(str(a)+"~python~"+str(b)+"!!!")
複製代碼

TOP

  1. # -*- coding: utf-8 -*-
  2. a=123
  3. b=456
  4. print(a,"python",b)
  5. print(a,"python",b,sep="~")
  6. print(a,"python",b,sep="~",end="!!!\n")
  7. print(a,"python",b,sep="~",end="!!!")
複製代碼

TOP

  1. a=123
  2. b=456
  3. print(a,"python",b)
  4. print(a,"python",b,sep="~")
  5. print(a,"python",b,sep="~",end="!!!\n")
  6. print(str(a)+"~python~"+str(b)+"!!!")
複製代碼

TOP

  1. a=123
  2. b=456
  3. print(a,"python",b)
  4. print(a,"python",b,sep="~")
  5. print(a,"python",b,sep="~",end="!!!\n")     
  6. print(str(a)+"~python~"+str(b)+"!!!")
複製代碼

TOP

  1. a = 123

  2. b = 456

  3. c ="python"

  4. print("helloWorld")

  5. print(a,c,b)

  6. print(a,c,b,sep='~')

  7. print(a,c,b,sep='~',end="!!!\n")

  8.      
複製代碼

TOP

  1. # -*- coding: utf-8 -*-
  2. """
  3. Spyder Editor

  4. This is a temporary script file.
  5. """

  6. print("hello world")
  7. print(120,"apple",69)
  8. a=120
  9. b=69
  10. print(a,"apple",b,)
  11. print(a,"apple",b,sep="=")
  12. print (a,"kenny",b,sep="-",end="$")
複製代碼

TOP

  1. print("100"+"200")
  2. print(100,"python",200,sep="~",end="...\n")
複製代碼

TOP

  1. a=123
  2. b=456
  3. print(a,"python",b)
  4. print(a,"python",b,sep="~")
  5. print(a,"python",b,sep="~",end="!!!\n")
  6. print(str(a)+"~python~"+str(b)+"!!!")
複製代碼

TOP

  1. print(100<"python",60)
  2. print(str(100)+"python"+str(60))
  3. print(100,"python",sep="&")
  4. print(100,60,sep="&",end="")
複製代碼

TOP

  1. # -*- coding: utf-8 -*-



  2. age=12
  3. name="Adam"
  4. print("我叫"+name,"今年"+str(age)+"歲")
複製代碼

TOP

返回列表