Public users codes are in this section. You can use these codes for learning or as a basic base for your code.
import pandas as pd
data = {'name': ['John', 'Doe', 'Jane', 'Smith'],
'age': [25, 30, 18, 40 ...See and Runimport pandas as pd
data = {'name': ['John', 'Doe', 'Jane', 'Smith'],
'age': [25, 30, 18, 40 ...See and Run<?php
if(isset($_FILES["fileToUpload"])) {
$target_dir = "uploads/";
$target_file = $target ...See and Run# Mehdi Ghulami
a=int(input("enter number"))
for i in range(1,a+1):
for j in range(1,i+1):
...See and Run# Function for nth Fibonacci number
nterms = int(input("How many terms? "))
# first two terms
n1, ...See and Runn = 5
# upward pyramid
for i in range(n):
for j in range(n - i - 1):
print(' ', end='') ...See and Run# A function that returns the 'year' value:
def myFunc(e):
return e['year']
cars = [
{'car': ' ...See and Runimport re emails =["support@backendbaz.ir",\ "mysite@you.me.net",\ "my-site@you-me.net",\ "mysite.o ...See and Run
import re
txt = "09123456789"
isValid = re.search("^09[0-9]{9}$", txt)
if isValid:
print("Valid" ...See and Runfrom math import sqrt
def is_prime(num):
if num == 0 or num == 1:
return False
elif num ...See and Rundef is_prime(num):
count = 0
for i in range(1, num+1):
if num % i == 0:
count = ...See and Runimport datetime
date1 = datetime.datetime(2022, 1, 1, 12, 30, 0)
print(date1.strftime('%Y %m %d'))
# ...See and Runimport datetime date1 = datetime.datetime(2022, 1, 1, 12, 30, 0) date2 = datetime.datetime(2021, 7, ...See and Run
import numpy as np ar = np.array([[1, 2, 3], [4, 5, 6]]) print(np.sqrt(ar)) ...See and Run
# لیست اولیه mylist = ['4533-ali', '8642-maryam', '1298-mohammad', '3287-mahsa'] # تعداد کارکتری ...See and Run
# لیست اولیه mylist = ['4533-ali', '8642-maryam', '1298-mohammad', '3287-mahsa'] # تعداد کارکتری ...See and Run
from functools import reduce s = ['I', 'have', 4, 'apples', 'and', 18, 'bananas'] listToStr = redu ...See and Run
def convertListToString(myList):
return " ".join(myList)
print(convertListToString(['I', 'love' ...See and Run#include <iostream>
using namespace std;
int main() {
try {
int age = 15;
if (age > 18) ...See and Run#include <iostream>
using namespace std;
int main() {
const int myNum = 15; // myNum همیشه برابر ...See and Runpublic class MyClass {
//متد جمع
static void sum(int[] numbers) {
int s = 0;
for (int i ...See and Runpublic class Main {
public static void main(String[] args) {
int[][] myNumbers = { {1, 2, 3, 4 ...See and Runpublic class MyClass {
public static void main(String[] args) {
int level = 4;
switch (lev ...See and Runpublic class MyClass {
public static void main(String[] args) {
String firstName = "John ";
...See and Run