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 Basics1
Get link
Facebook
X
Pinterest
Email
Other Apps
x=10
if(x==10) :
print("x value is 10");
else :
print("x value is not 10");
#Searching an existence of a file in Current directory import os #myFileName = 'UnderstandLists.py' #isfile() returns a boolean value True if file is available #isfile() returns a boolean value False if file is not available #fileExists = os.path.isfile(myFileName) #print(fileExists) myFileName = input('Enter a File Name to search: ') fileExists = os.path.isfile(myFileName) if(fileExists): print(myFileName, 'is available') else: print(myFileName, 'is not available')
<html> <head> teju's head </head> <script> var b,t; function fun(b,t) { return b*t; } </script> <body> var x=fun(5,6); alert("x is "+x); </body> </html>
import socket import io import cv2 import numpy def Main(): host = socket.gethostname() port = 5000 s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.connect((host,port)) filename = input("Filename?-> ") if filename != 'q': s.send(filename.encode()) data = s.recv(1024).decode() if data[:6] == 'EXISTS': filesize = (data[7:]) message = input("File Exists, "+str(filesize)+"Bytes, download? (Y/N)? -> ") if message == 'Y': s.send('OK'.encode()) fd = open('new_'+filename,'wb') data = s.recv(1024) totalRecv = len(data) print('The totalRecv has a value: '+str(totalRecv)) print('The type of totalRecv is: '+str(type(totalRecv))) print('The filesize has a value: '+filesize) print('The type of filesize is :'+str(type(filesize))) print('The type of data is: '+str(type(data))) fd.wr...
Comments
Post a Comment