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

  Question 1-are all laws ethical why or why not provide

question 1-are all laws ethical? why or why not? provide examples of ethical and unethical laws.support your answer

  1 create a narrative that describes the site to your

1. create a narrative that describes the site to your prospective client.2. create a storyboard diagram depicting the

  Question 1a jsp expression can contain any java expression

question 1a jsp expression can contain any java expression that evaluates to aquestion 1 optionsstring objectjava

  1 two of the best-known approaches to developing normative

1. two of the best-known approaches to developing normative ethical theories are consequential teleological and

  Designing page to count number of page views in php

Design a page to count number of times page is viewed by a user in single session in PHP/SQL.

  Design a dynamic database using mangodb html and php

design a dynamic database using mangodb html and php. database should be designed to have the subsequent static

  Develop an envisioned methodology and design a research

develop an envisioned methodology and design a research topic based on the research problem purpose. then write a

  Student counseling expert system

This is a web-based Expert System, rule-based. WAMP should be the platform of execution. PHP is the programming language of choice along with an extension for Expert System

  Create an xslt stylesheet that transforms the provided xml

Use the documents that are posted on share out. Many of them demonstrate very similar (or even the same) examples as what you are being ask to do for this assignment.

  Non-functional mock-up of web pages

Non-functional mock-up of Web pages Diagram of database tables with column names and data types Final tested version of all Web application software.

  String manipulation functions by php explain the various

explain the various built in string manipulation functions supported by php and explain four scalar types of

  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.

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