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

Arraying 101


by CodeChum Admin



I want you to make an array of numbers for me. All you have to do is make a program that will let me input any random integer in one line. Afterwards, it will then print out all the numbers I've inputted, backwards, on separate lines.





Care to do that for me?



Input



The first line contains the size of the array.


The next line contains the integers separated by a space.



5


1·64·32·2·11


Output



Multiple lines containing integers on each.



11


2


32


64


1

Create a program using one-dimensional array that searches a number if it is found on the list of the given 5 input numbers and locate it exact location in the list


How to print square pattern like this.



When input=4.



1 2 3 4



5 6 7 8



9 10 11 12



13 14 15 16




The python list called customer_list contains a list of 6 objects of the Customer class. Each customer object as 2 public attributes: name and balance. Which of the following statements will correctly add R250 to the first customer object's balance?

Write a program to print T in all scales viz Celsius, Fahrenheit, and Kelvin.


Create a structure called time. Its three members, all type



int, should be called hours, minutes, and seconds. Write a



program that obtains two time values from the user in



12:59:59 format, stores them in struct time variables,



converts each one to seconds (type int), adds these



quantities, converts the result back to hours-minutes-



seconds, stores the result in a time structure, and finally



displays the result in 12:59:59 forma

Create a Python code that will accept two numbers from the user and prints "True" if it satisfies the condition and "False" otherwise. Use comparison operators ">", "<=", "!=", ">=", and "<".

Write a Java driven application that performs the following tasks:



1. Allow the user to decide on the length of an array that will be created at run time.



2. Enter integer elements into such an array



3. Sort the elements in ascending order (DO NOT USE bubble sort)



4. Search for a user specified element in the array and return the number of times



the searched key is observed (DO NOT USE linear search)

The students’ IDs and test answers are



stored in a file. The first entry in the file contains answers to the test in the form:



TFFTFFTTTTFFTFTFTFTT



Every other entry in the file is the student ID, followed by a blank, fol- lowed by the student’s responses. For example,



the entry:



ABC54301 TFTFTFTT TFTFTFFTTFT



indicates that the student ID is ABC54301 and the answer to question 1 is True, the answer to question 2 is False, and



so on. This student did not answer question 9. The exam has 20 questions, and the class has more than 150 students.



Each correct answer is awarded two points, each wrong answer gets one point deducted, and no answer gets zero



points.



Write a program that processes the test data. The output should be the student’s ID, followed by the answers, followed



by the test score, followed by the test grade. Assume the following grade scale: 90%–100%, A; 80%–89.99%, B; 70%–



79.99%, C; 60%–69.99%, D; and 0%–59.99%, F.

you are working as a freelancer. A company approached you and asked to create an algorithm for username validation. The company said that the username is string S .You have to determine of the username is valid according to the following rules.

1.The length of the username should be between 4 and 25 character (inclusive).

2.Valid username must start with a letter.

3 Valid username can only contain letters, numbers, and underscores characters.

4 Valid username cannot ends with the underscore character and also doesn't accept the special characters.


INPUT: The first line contains an integer T representing the number of test cases.

The first line of each test cases input contains a string.


OUTPUT: Each test case gives a Boolean value as output(true or false)


sample Input:

3

google

Google_123

google@123


sampleOutput

true

true

false

sample input 2

HelloPython

#Coder

CoderIt

sampleoutput 2

true

false

true



LATEST TUTORIALS
APPROVED BY CLIENTS