#Input
#input() will get user input in console
print("hello "+input("what is your name?"))
print(len(input("what is your name?")))
#String
print("hello world! \nhello world!\nhello world!")
print("hello"+"angela")
print("hello"+" angela")
print("hello"+" "+"angela")
#Print
print('Day 1 - Python Print Function')
print("The function is declared like this:")
print("print('what to print')")
#Variable
name=input("what is your name?")
length =len(name)
print(length)
#change value
a=input("a:")
b=input("b:")
c=a
a=b
b=c
print(a)
print(b)
#Name Generator
print("Welcome to the band name generator.")
city = input ("Which city did you grow up in?\n")
pet = input("What the name of a pet?\n")
print("Your band name could be "+city+" "+pet)
Day1_Udemy Python 100days
于 2023-08-08 13:06:49 首次发布