Questions: 5 290

Answers by our Experts: 5 288

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

First Prime Number:


(1) Input: 5 Output: 3

1

10

4

3

2


(2) Input: 4 Output: 2

2

3

5

7


Composite Numbers in the range:


(1) Input: 2 Output: 4

9 6

8

9


(2) Input: 1 Output: 4

4


Write a program that will create a list of four animals, and will use a For loop to print out each of the animals in the list. First write an algorithm in the online editor below.


given an integer N write program which reads N inputs and prints the product of the given integers

2 3 7


B. Create a program using Python programming language that counts election vote for a president. Your program should display first the list of people who are running for president, after which your program should ask the user for his/her vote (based on number). There should be a total of 20 voters. After entering the votes of 20 voters, your program should display the winner including the number



29 / 29



of votes. It should also display the second, third until last place including the number of votes they have. Used for loop and if, elif, else statement on your program. Apply iter() and next() methods on your program. Use list in storing the votes. Observed correct variab le names.




A .Using Python programming language, create a program that allows the user to compute for his/her fare using the information below;







0-5km = P20.00






6-10km = P30.00






11-15km = P40.00








The bus only travels within the province, so the distance does not exceed from 15 kilometers. Your program should ask the user for distance travelled, and your program will compute and display the fare.








Use the If, elif, else statement on your program. Select appropriate data type and create appropriate variable names for your program.











Using function:




a. sort a list using bubble sort algorithm (ascending and descending order). you have




to take choice from the user. also the list should be user defined




b. search an item using binary search algorithm

User inputs a word. Programmesays if it has vowels or not

Take in a number




from the user print if it's divisible by 3 or 5 or 3 and 5

Calculate and display the sum of all the numbers divisible by 7 between 18 and 534 using loops and conditional statements i.e. 21+28+35+...+525+532.



LATEST TUTORIALS
APPROVED BY CLIENTS