Day name
For those of you who may not now, a factorial is a product of multiplying from 1 until the number. Now, you must make a program that will accept an integer and then print out its factorial using loops.
Are you up for this task?
Instructions:
Input
A line containing an integer.
5
Output
A line containing an integer.
120
translate the binary search and insertion algorithm into a subprogram BINARY(ARRAY,LB,UB,ITEM,LOC) which finds either the location LOC where ITEAM appears in ARRAY or the location LOC where ITEAM should be inserted into Array using python
What will the Linux command, du -h -d 1 | sort -hr, produce as output.
Given a 5-D python array with shape (24x4096x2016x24x8), and each element in the array is a 8-bit unsigned integer, calculate the approximate amount of RAM such array will take if you are using them in python.
BINARY(ARRAY,LB,UB,ITEM,LOC) which finds the location LOC where ITEM appears in ARRAY
Did you know that you can also reverse lists and group them according to your liking with proper code? Let's try it to believe it.
Instructions:
Create a variable that accepts a positive odd integer.
Create an empty list. Then, using loops, add random integer values into the list one by one. The number of values to be stored is dependent on the inputted odd integer on the first instruction.
Reverse the order of the list. Then, print out the list's new order in this manner:
[first-half values]-[middle value]-[second-half values], just like that of the sample output. Make use of list slicing that you’ve learned from the past lessons to easily achieve this segment.
Input
The first line contains an odd positive integer.
The next lines contains an integer.
5
1
3
4
5
2
Output
A line containing a list.
[2,5]-[4]-[3,1]
by CodeChum Admin
Remember that time when we've tried identifying the largest digit among the given integer? Well, let's take it to the next level, and figure out the same thing on arrays/lists!
Let's do this one more time!
Instructions:
Input
The first line contains the size of the array/list.
The next lines contains an integer on each.
5
5
34
3
23
10
Output
A line containing an integer.
34
rearrange numbers in a string
given a string write a program to arrange all numbers appearing in the string in decreasing order
https://www98.zippyshare.com/v/dyPJAeHF/file.html
https://www98.zippyshare.com/v/mG8vx3EN/file.html