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

I wanna experiment on looping through a range of numbers that will be randomly inputted by the user. However, I don't want to let them see the loading percentage that is divisible by 4, so please exclude those for me when printing it out.

Thank you!


Instructions:

  1. Input two integers in one line. The first inputted integer will be the starting point, and the second one shall serve as the ending point.
  2. Use the power of loops to loop through the starting point until the ending point (inclusive), and print out each number within the range with the corresponding format shown on the sample output.
  3. However, skip the printing of statement if the integer is divisible by 4.
  4. Tip: Utilize the continue keyword to complete the process.

Write a function named test_sqrt that prints a table like the following using a while loop, where


"dià" is the absolute value of the diàerence between my_sqrt(a) and math.sqrt(a).


a = 1 | my_sqrt(a) = 1 | math.sqrt(a) = 1.0 | diff = 0.0


a = 2 | my_sqrt(a) = 1.41421356237 | math.sqrt(a) = 1.41421356237 | diff =


2.22044604925e-16


a = 3 | my_sqrt(a) = 1.73205080757 | math.sqrt(a) = 1.73205080757 | diff =


0.0


a = 4 | my_sqrt(a) = 2.0 | math.sqrt(a) = 2.0 | diff = 0.0


a = 5 | my_sqrt(a) = 2.2360679775 | math.sqrt(a) = 2.2360679775 | diff = 0.0


a = 6 | my_sqrt(a) = 2.44948974278 | math.sqrt(a) = 2.44948974278 | diff =


0.0


a = 7 | my_sqrt(a) = 2.64575131106 | math.sqrt(a) = 2.64575131106 | diff =


0.0


a = 8 | my_sqrt(a) = 2.82842712475 | math.sqrt(a) = 2.82842712475 | diff =


4.4408920985e-16


a = 9 | my_sqrt(a) = 3.0 | math.sqrt(a) = 3.0 | diff = 0.0


Modify your program so that it outputs lines for a values from 1 to 25 instead of just 1 to 9


You know, I was lying when I said the last time that numbers associated with 3 are my favorite, because the one I actually like the most in the world are even numbers! But to make things harder for you, you have to pick the even numbers from a range of two given numbers. Ha!

Now, let's try this one more time! 


Instructions:

  1. Input two integers in one line, separated by a space. The first integer shall represent the starting point, and the other, the ending point.
  2. Print out all even numbers that are within the range of the starting and ending point (inclusive or including the ending point).


Input


1. The starting point

2. The ending point

Output


The first line will contain a message prompt to input the starting point.

The second line will contain a message prompt to input the ending point.

The last line contains the integers within the range.


Let’s play a game of FizzBuzz! It’s quite the same with your childhood "PopCorn" game, but with a little bit of twist to align it with programming.




Are you ready?




Instructions:


Input a positive integer in one line. This will serve as the ending point of your loop.

Loop from 1 to the ending point (inclusive) and perform the following statements:

If the number is only divisible by 3, print "Fizz"

If the number is only divisible by 5, print "Buzz"

If the number is divisible by both 3 and 5, print "FizzBuzz"

If nothing is true in the previous conditions, skip the number


Whole numbers are great, but I think we should also pay attention to decimal numbers, too.


So, how about we make a program that involves a lot of decimals?


Instructions:

  1. Continuously ask for floating point values (decimal numbers) using the do…while() loop, sum them all up, and store the total into one variable.
  2. The loop shall only terminate for the following reasons:
  3. A negative decimal number is inputted (but still included in the total sum)
  4. The total sum reaches 100.0 or more

2. A, e, i, o, u?


by CodeChum Admin



We've had enough about numbers, so why don’t we try evaluating characters now?



If you know how to identify what the vowel letters are, and you know how to count up to 5, then you’re good to go!





Instructions:



Using a do…while() loop, continuously scan for characters (one per line) and print it out afterwards. Remember to place a space before the character's placeholder when scanning so that the newline characters will be ignored and the correct values will be scanned.


The loop shall terminate due to either of the following reasons:


The inputted character is a vowel


The number of inputted characters has already reached 5.


For all of the test cases, it is guaranteed that if the number of inputted characters is less than 5, then there must be a vowel from among the inputted characters. Also, it is guaranteed that all the characters are in lowercase.

  1. Add a text file named poem.txt
  2. Search for a school appropriate short poem and copy and paste the contents into your poem.txt file. 

Create a simple text-based console game that implements at least three (3) interfaces.


  1. Create two (2) overloaded methods that display a greeting message and use first name and last name as its parameters.
  2. Write two (2) overloaded methods that will compute the total price of an item. Use the total item and price as parameters, which are both floating-point numbers.

1. Using your preferred IDE or this online IDE, create a Java stack consisting of four (4) book titles entered by the user. Pop the stack's elements one by one; each popped element will be added to a queue. Then, print the content of the queue.



LATEST TUTORIALS
APPROVED BY CLIENTS