Hey, I hope you are well.
Can you explain me the conversion from for loop to while loop vice versa in Python and Java? (As well as giving the examples of Recursive Function or Fruitful Functions)
Write a java program that accepts given n number of marks for a PRG510S test, and stores them into an array named marks. After all marks have been entered your program should accomplish the following:
[n - to be provided by user input]
a) Find and display the highest mark
b) Find and display the lowest mark
c) Compute and display the average mark
(Above tasks (a, b, and c should be accomplished using only one loop)
Write a java program that specifies three parallel one dimensional arrays name length, width, and area. Each array should be capable of holding a number elements provided by user input. Using a for loop input values for length and width arrays. The entries in the area arrays should be the corresponding values in the length and width arrays (thus, area[i] = length [i]* width [i]) after data has been entered display the following output:
Write a java program that accepts given n number of marks for a PRG510S test, and stores them into an array named marks. After all marks have been entered your program should accomplish the following:
[n - to be provided by user input]
a) Find and display the highest mark
b) Find and display the lowest mark
c) Compute and display the average mark
(Above tasks (a, b, and c should be accomplished using only one loop)
Sample Run1
Enter numbers of marks: 10
Enter 10 marks: 55 60 89 75 25 77 92 15 68 40
Output1: Highest Mark = 92%
Lowest Mark = 15%
Average = 58%
Write a program that rolls a pair of dice until the sum of the number rolled is a specific number. we also want to know the number of times the dice are rolled to get the desired number. the smallest number or each die is 1 and the larges number is 6. so the smallest sum of the numbers rolled is 2 and the largest sum of the numbers rolled is 12. we use the random number generator, to randomly generate a number between 1 to 6.
A. Create a statement that randomly generates a number between 1 to 6 and stores that number into die1, which becomes the number rollled by die1
B. Similarly, create a statement that randomly generates a number between 1 to 6 and that number into die2, which becomes the number rolled by die2.
C. Next, determine whether sum contains the desired sum, then we roll the dice again.
D. Create a method named rolldice that takes as a parameter the desired sum of the numbers to be rolled and returns the number of times the dice are rolled to roll the desired sum.
create a program that is expected to monitor access and attempted accesses to your network. All logon activities should be logged. All passwords should have a minimum length of 6 characters and they should use a mixture of letters, numbers and capital letters. Users are required to change their password every 30 days. All users are to get 700 MB secure storage space on the server for personal use. All home folders must be protected in such a way that only the owner can access his/her home folder. All users except those in production should be able to retain their individual settings regardless of the workstation they are using. Users in Production should not be able to change their individual setting and any changes should be discarded on log off.