Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

The Big One

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:

  1. Create a variable that accepts a positive integer.
  2. 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 positive integer given in the first instruction.
  3. Print out the largest integer among all the elements on the list, by any means necessary.

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

Groupings

by CodeChum Admin

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:

  1. Create a variable that accepts a positive odd integer.
  2. 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.
  3. Reverse the order of the list. Then, print out the list's new order in this manner:
  4. [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]

String Replacement

by CodeChum Admin

Lists are fun to make, but it's even better to add or remove things from it when it's not usable anymore, right? Let's do just that in this problem now!


Instructions:

  1. Create two variables that will accept string values.
  2. A list containing three string values is already given to you in the code editor on the side. First, insert the first inputted string to the end of the list.
  3. Then, insert the second inputted string into the beginning of the list.
  4. There are now 5 elements on the given list. Now, remove the 4th element of the list. Apply the concept of index positions in order to access the 4th string element and successfully remove it from the list.
  5. Print out the remaining contents on the list, each separated by a new line, using loops.

Input

Two lines containing a string.

fun
Python

Output

A line containing a string.

Python·is·really·fun

Square to the Next Level

by CodeChum Admin

We've already tried printing out the values of an array in reversed order, right? Today, we shall compute for the squares of all the numbers.


There's already a predefined array/list containing 100 integer values. Loop through each values, compute their squares, and display them.


Output

Multiple lines containing an integer.

4
9
25
10000
49
9
25
9
1
16
.
.
.

Only the Even Ones

by CodeChum Admin

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

A line containing integers separated by a space.

33·54·32·11·8

Output

Multiple lines containing an integer.

2
54
32
8

"Even" Now

by CodeChum Admin

I'm really fond of even numbers, you know? That's why I'll be letting you make another even number problem yet again. This time, you need to print from a range of two inputted numbers, n1 and n2 (inclusive), all the even numbers from n2 down to n1, in descending order.

How about that?


Input

A line containing two integers separated by a space.

3·10

Output

Multiple lines containing an integer.

10
8
6
4




SAMPLE OUTPUT: Input your first name: John Input your last name: Doe Input your course: 3515 Input your address: Sta. Cruz, Tinambac, C.5. Input your birth year: 1999. Hello John Doe, you are a BSIS student from Sta Cruz, Tinambac, C.S. your age is 22

Write a program that reads a string and returns a table of the letters of the alphabet in

alphabetical order which occur in the string together with the number of times each letter

occurs. Case should be ignored. A sample output of the program when the user enters the data

“ThiS is String with Upper and lower case Letters”, would look this this:


a 2

c 1

d 1

e 5

g 1

h 2

i 4

l 2

n 2

o 1

p 2

r 4

s 5

t 5

u 1

w 2


write a python program that accepts a quiz average, midterm grade, and final grade. Compute


the numerical grade , nm= ( quiz average + midterm grade + final grade)/3 and converts it to an equivalent letter


grade, and displays the letter grade. Use appropriate message for the program

Write a python program that prompt the user for two numbers read them in and print out the product labelled

LATEST TUTORIALS
APPROVED BY CLIENTS