Find the prime number and prepare the code in php

Assignment Help PHP Web Programming
Reference no: EM13705150

Part 1: Create a function that checks if an integer n is a prime (returns true if the integer is prime and false otherwise). In the body of your page create a loop that uses this function to check and display all primes in a range from 1 to 100.

Part 2: Create a function GeneratePassword which accepts two arguments, an integer and a character string consisting of letters (a-z) and digits (0-9).

When GeneratePassword(5,'abc0123') is called, it should return a random string of 5 characters taken from 'abc0123'.

For case: GeneratePassword(7,'abczxc012394') could return any of the subsequent outputs : 2c00acb 2c23z93 030b2a4

In the body of your page generate three different calls to this function using a different numeric value and text string and display the results.

You need to find the prime number and prepare the code in PHP. I'm not sure how to solve the question. Can anyone help me?

Reference no: EM13705150

Questions Cloud

What is the total file transfer time : How many packets must be transmitted to accomplish the file transfer - What is the total file transfer time.
Explain how many photons are produced each second : Problem- A typical 100-watt light bulb consumes 100J of energy per second. If a light bulb converts all of this energy to 500nm light, how many photons are produced each second
Evaluate a polynomial at a given real value : Write a function to evaluate a polynomial at a given real value a.
Create a function gcd : Create a function gcd(a, b) that receives two integers and returns the greatest common denominator of the two integers.
Find the prime number and prepare the code in php : Create a function that checks if an integer n is a prime (returns true if the integer is prime and false otherwise). In the body of your page create a loop that uses this function to check and display all primes in a range from 1 to 100.
Create a void function that takes as parameters : Create a void function that takes as parameters two integers, adds them, and prints them out to the command line.
How much heat is released when 3g of hydrogen reacts : Problem- The enthalpy of formation of water is -241.8 kJ/mol. How much heat is released when 3g of hydrogen reacts with excess oxygen to form water
Print all lines where the birthdays are in november : Print all lines where the birthdays are in November or December - Append three asterisks to the end of lines starting with Fred
Calculate the change in energy of the balloon in j : Problem- A balloon is inflated to its full extent by heating the air inside of it. During this process, 1100 J of heat is added and the work done by the balloon is 121 cal. Calculate the change in energy of the balloon in J.

Reviews

Write a Review

PHP Web Programming Questions & Answers

  Random integral numbers based on normal distribution

Prepare a system to generate random integral numbers based on normal distribution. Study Data Generator's structure and extend number generation type to activate normal distribution.

  Shopping cart program for web applications class

Shopping Cart program for web applications class. Allows user to browse while keeping track of the items in which they will purchase at the end on the order page link and this will give a final price for all items.

  Create a web site for an apple farm

Create a web site for an apple farm. Create an HTML5 form allowing visitors to create an account with the site. Account details are to be stored in your MySQL database. Information should be stored in a secure way.

  Develop a dynamic website open university

Develop a dynamic website Open University

  Sample website project

This website consists of three sections: a narrative, a storyboard, and a business Website.

  Online banking application

Designing and developing a web applications The company you are working has secured a contract with a local banking group to develop an ONLINE BANKING APPLICATION using PHP and MySQL.

  Design a dynamic database

Design a dynamic database using Mangodb, html , and php.

  Show the accessibility and usability of website

The webpage must have several menus about country Azerbaijan such as "About Azerbaijan" "History" "Geography" "Landscape" and "Accessibility" menu.

  Implement a web application

Implement a web application called CS320Starter, which is similar to the crowd funding platform Kickstarter where people raise funds for their projects.

  Prepare an ajax enabled web form

Prepare an AJAX enabled web form utilising a ListView control that will allow logged-in staff to list, edit, delete, insert magazine details for magazines from a selected magazine category.

  Create a very simple order system as a web application

Create a very simple Order System as a web application.

  Which of the following jsp expressions is valid

A JSP expression can contain any Java expression that evaluates to a String object, Java object, primitive type, primitive type or Java object

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd