diff --git a/CSV_file.py b/CSV_file.py new file mode 100644 index 00000000000..d67e23064c4 --- /dev/null +++ b/CSV_file.py @@ -0,0 +1,14 @@ +import pandas as pd + +# loading the dataset + +df= pd.read_csv(r"c:\PROJECT\Drug_Recommendation_System\drug_recommendation_system\Drugs_Review_Datasets.csv") + +print(df) #prints Dataset +# funtions +print(df.tail()) +print(df.head()) +print(df.info()) +print(df.describe()) +print(df.column) +print(df.shape()) \ No newline at end of file diff --git a/kilo_to_miles.py b/kilo_to_miles.py new file mode 100644 index 00000000000..ff33cd208c5 --- /dev/null +++ b/kilo_to_miles.py @@ -0,0 +1,4 @@ +user= float(input("enter kilometers here.. ")) +miles= user*0.621371 +print(f"{user} kilometers equals to {miles:.2f} miles") + diff --git a/string_palin.py b/string_palin.py new file mode 100644 index 00000000000..1349f993c4c --- /dev/null +++ b/string_palin.py @@ -0,0 +1,20 @@ +# + +# With slicing -> Reverses the string using string[::-1] + + +string= input("enter a word to check.. ") +copy=string[::-1] +if string == copy: + print("Plaindrome") +else: + print("!") + +# Without slicing –> Reverses the string manually using a loop +reverse_string="" +for i in string: + reverse_string=i+reverse_string +if string == reverse_string: + print(reverse_string) +else: + print("!") \ No newline at end of file