by CodeChum Admin
We've already made arraying/listing the easy way, but how about arraying/listing and printing the list in reverse order?
Make a program that will input an integer and then using loops, add items on an array/list one by one for the same number of times as that of the first inputted integer. Then, print out the array/list in reverse order, that is, starting from the last item on the array/list down to the first one, each in separated lines.
Input
The first line contains the size of the array/list. The next lines contains the items of the array/list (integers).
5
1
64
32
2
11
Output
Multiple lines containing integers.
11
2
32
64
1
by CodeChum Admin
You already know how to access the middle value of a certain string using index positions, right? Then let's put your learnings to practice.
Make a program that shall input a long string that contains an odd number of individual strings separated by comma. Afterwards, input the string that's located in the middle index position.
Let's do this.
Input
A line containing a string separated by a comma.
Python,is,fun
Output
A line containing a string.
is
by CodeChum Admin
Make a program that will accept an integer and loop for the same number of times as that of the inputted integer and input random integers and add it to the array/list one by one, per line. Afterwards, make your program accept another random integer.
Using that final integer, compare from your array/list if the final integer's value is also present in your current array/list. If so, print "Present"; otherwise, print "None".
Start coding now!
Input
The first line contains the size of the array/list. The next lines contain the integers. The last line contains an integer to be searched.
5
3
21
2
5
23
2
Output
A line containing a string.
Present
Only the Even Ones
I have a list of 3 numbers here with me that's already in the code editor, but I want you to add some more to this list by inputting some more numbers yourself in one line and then, print out only the even numbers from the list.
Can you do that for me?
Input:
33 54 32 11 8
Output:
2
54
32
8
Create an application to help the accountant make a billing statement showing the
customer's name, address, number of participants, training fee,
registration fee and total amount due.
P3,000 for training fee
P250 per person for registration fee
Create a flowchart of the following Pseudocode
Start
If option = A;
display items in stock;
print “Well here’s what we have in stock”; print(“Item\t\tCost\t\tCode”); print(“Candies\t\t14.50\t\t001”); print(“Cooldrinks\t\t17.20\t\t002”); print(“Cokes\t\t10.99\t\t003”);
end if
End
ESSAY, If you could or invent a new feature (something that has not been developed or invented yet) to our modern computers, what would it be? What benefits will it provide to everybody who uses/utilize that feature?
Did you know that in lotteries, a 3-digit number with the same numbers in all digits like 777 will hit the jackpot in a casino? In the same manner, let's make a program that will test if a certain 3-digit number hits a jackpot or not by identifying if all the digits of a given number is the same as the second inputted number. If it is, print "Jackpot!"; else, print "Nah".
Let's try this out now!
Input
A line containing two integers separated by a space.
777·7Output
A line containing a string.
Jackpot!given an integer n as input, write a program to print a number diamond of 2*n -1 rows
input1: 5
input2:4
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
1
1 2
1 2 3
1 2 3 4
1 2 3
1 2
1Write a procedure and call it into main pl/sql program to find a factorial of a number.