Category: Programming
Playing With String in Function of Python def takData(input_data): return (“Hi my name is: {}”.format(input_data)) input_data=input(“Enter your…
user_input=input(“Enter your name: “) #message=”Hello %s” % user_input message=f”Hello {user_input}” print(message)
def mean(value): if type(value)==dict: the_mean=sum(value.values())/len(value.values()) else: the_mean = sum(value) / len(value) return the_mean monday_temperatures=(8.8,9.1,9.9) student_grades={“Marry”:9.1,”sim”:8.8,”John”:7.5} print(mean(monday_temperatures)) def…
def area(a): the_area=a*a return the_area print(area(7)) def foo(value): fluid=value*29.57353 return fluid print(foo(5))
Summary for python learning: Positive/Negative Indexes, Slicing: Lists, strings, and tuples have a positive index system: [“Mon”,…
Question:Append the first item of weekend to workdays workdays = [“Mon”, “Tue”, “Wed”, “Thu”, “Fri”] weekend…
Recent Comments