Category: Programming

12
Nov
2019

Python String formatting

Playing With String in Function of Python def takData(input_data): return (“Hi my name is: {}”.format(input_data)) input_data=input(“Enter your…

07
Nov
2019

Python String Input Need To Clear From Internet

user_input=input(“Enter your name: “) #message=”Hello %s” % user_input message=f”Hello {user_input}” print(message)  

07
Nov
2019

Python Function Calling

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…

03
Nov
2019

Python Function

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))  

03
Nov
2019

Positive/Negative Indexes, Slicing of Tuples

Summary for python learning: Positive/Negative Indexes, Slicing: Lists, strings, and tuples have a positive index system: [“Mon”,…

03
Nov
2019

Working with lists and append

Question:Append the first item of weekend to workdays   workdays = [“Mon”, “Tue”, “Wed”, “Thu”, “Fri”] weekend…