This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("hello World!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
# المسار المطلوب (ضع '.' للمجلد الحالي) | |
directory = '.' | |
# جلب الملفات فقط (تجاهل المجلدات) | |
files = [f for f in os.listdir(directory) if os.path.isfile(os.path.join(directory, f))] | |
# طباعة أول 5 ملفات | |
for i, filename in enumerate(files[:5], 1): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
# المسار المطلوب (ضع '.' للمجلد الحالي) | |
directory = '.' | |
# جلب الملفات فقط (تجاهل المجلدات) | |
files = [f for f in os.listdir(directory) if os.path.isfile(os.path.join(directory, f))] | |
# طباعة أول 5 ملفات | |
for i, filename in enumerate(files[:5], 1): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
print("hello you!") | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
// printf() displays the string inside quotation | |
printf("Hello, World!"); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
txt=["0{}".format(str(bin(s))[2:]) if len(str(bin(s))[2:])==1 else str(bin(s))[2:] for s in range(0,4)] | |
print("AND\tOR\tXOR\tNAND\tNOR\tXNOR\tNOT\t\n"+"\n".join(["{0}|{1}|{2}\t{0}|{1}|{3}\t{0}|{1}|{4}\t{0}|{1}|{5}\t{0}|{1}|{6}\t{0}|{1}|{7}\t{0}|{8}\t".format(s[0],s[1],int(s[0])&int(s[1]),int(s[0])|int(s[1]),int(s[0])^int(s[1]),int(not(int(s[0])&int(s[1]))),int(not(int(s[0])|int(s[1]))),int(not(int(s[0])^int(s[1]))),int(not(int(s[0])))) for s in txt])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
// Static Member and Virtual Destructor Demonstration | |
class Animal { | |
protected: | |
string name; | |
static int animalCount; // Static member to track the number of animals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fact=lambda num: num*fact(num-1) if num>1 else num; | |
print("\n".join(["{}!={}".format(n,fact(n)) for n in range(1,9)])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("hello world") |
NewerOlder