Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

converter python to C

num = input()
xzoj = 0
zoj = 0
fard = 0 
xfard = 0
for i in range(len(num)):
    if int(num[i]) % 2 ==0:
        xzoj +=1
        zoj += int(num[i])
    else :
        xfard +=1
        fard +=int(num[i])
print(zoj / xzoj)
print(fard / xfard)
Comment

c to python converter

#include
#include <stdio.h>

int main()
{
    int i, n;

    printf("Enter the value of n : ");
    scanf("%d", &n);

    printf("Number  Square  Cube
");

    for (i = 1; i < n + 1; i++)
    {
        printf("%d 	 %d 	 %d
", i, i * i, i * i * i);
    }

    return 0;
}
Comment

c to python converter

#include <stdio.h>

int main()
{
    int i, n;

    printf("Enter the value of n : ");
    scanf("%d", &n);

    printf("Number  Square  Cube
");

    for (i = 1; i < n + 1; i++)
    {
        printf("%d 	 %d 	 %d
", i, i * i, i * i * i);
    }

    return 0;
}
Comment

PREVIOUS NEXT
Code Example
Python :: serialization in python 
Python :: nested list comprehensions 
Python :: candlesticks python 
Python :: python code to open an application 
Python :: print next line 
Python :: df add column from dict 
Python :: swap variables 
Python :: string -1 python 
Python :: pandas first row to header 
Python :: read file bytes python 
Python :: python code for finding prime numbers 
Python :: multiprocessing in python 
Python :: palindrome python 
Python :: python parse xml string 
Python :: python boolean 
Python :: add element to list python 
Python :: divide list into equal parts python 
Python :: semaphore in python 
Python :: function to scale features in dataframe 
Python :: join tables pandas 
Python :: list comprehension odd numbers python 
Python :: how to add items in list in python 
Python :: python input - how to read a number 
Python :: sum of diagonal numpy 
Python :: pygame draw square 
Python :: reading an image using opencv library 
Python :: how to add number to string in python 
Python :: how to use iteration in python 
Python :: numpy sign method 
Python :: pandas explode 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =