I'm excited to showcase my coding journey on my blogspot. It's a deep dive into a multitude of programming languages, such as C, Java, Python, and beyond. I tackle challenging interview questions with thorough solutions. Come join me in exploring the world of programming!
Python Basics2
Get link
Facebook
X
Pinterest
Email
Other Apps
x=input("enter a value");
y=input("enter a value")
print (x+y)
x="my name is tejanth"\
"tejanth is my name"
print (x);
import pymysql import csv import os myCSVFileName= input('Enter a Filename: ') fileExists = os.path.isfile(myCSVFileName) myDBConnectObject = pymysql.connect('127.0.0.1','test','test123','scet-autonomous') if fileExists: print(myCSVFileName,' exist to load in to the Database Table') myCursorObject = myDBConnectObject.cursor() createTableQuery = 'create table if not exists SCETDATASETTABLE (REGISTRATION_NUMBER bigint,STUDENT_NAME varchar(50),STUDENT_GENDER VARCHAR(20),STUDENT_DEPARTMENT VARCHAR(20),STUDENT_CGPA float(4,2),STUDENT_EMAILID varchar(50), STUDENT_CONTACT_NUMBER bigint)' myCursorObject.execute(createTableQuery) record = [] with open(myCSVFileName,'r') as csvFileObject: reader = csv.DictReader(csvFileObject) for line in reader: record.append(line) for i in range(0,5000): Col1 = record[i]['REGISTRATION_NUMBER'] Col2 = record[i]['STUDENT_NAME'] ...
import platform cacheBegin, cacheEnd = 0, 0 print(cacheBegin) print(cacheEnd) for i in range( -500, 0): if i is int(str(i)): cacheBegin = i break for i in range( cacheBegin, 500 ): if i is not int(str(i)): cacheEnd = i - 1 break print( "Python version: {} implementation: {}".format( platform.python_version(), platform.python_implementation() ) ) print( "This implementation caches integers {} to {}".format( cacheBegin, cacheEnd ) )
Comments
Post a Comment