Giter Site home page Giter Site logo

simple-php-array-exercises's Introduction

Description

This repository contains a collection of simple PHP exercises focusing on arrays. Each exercise is designed to demonstrate different array manipulation techniques and basic programming concepts in PHP.

Scripts:

♡   ex1 : Initializes an array with 10 elements, each set to 0, and displays it.
♡   ex2 : Initializes an empty array and inserts the vowels at the beginning using the array_splice() function.
♡   ex3 : Creates a form to input 10 numbers and calculates their sum, average, and product using PHP.
♡   ex4 : Calculates the dot product of two vectors and displays the result.
♡   ex5 : Creates a form to input 10 numbers and finds the minimum and maximum values using PHP.
♡   ex6 : Creates a form to input 10 numbers, stores them in an array, and saves the array in a session variable. It then displays another form that allows users to input a number to check if it exists in the array, and displays the result.
♡   ex7 : Creates a form to input 10 numbers, stores them in an array, and saves the array in a session variable. It then displays another form that allows users to input a number to check the number of occurrences of that number in the array, and displays the result.
♡   ex8 : Creates a form to input the grades of 10 students, stores them in an array, calculates the class average, and counts the number of grades above the average. Displays the grades as an array, the class average, and the number of grades above the average.
♡   ex9 : Takes an array, reverses it, and displays both the original and reversed arrays.
♡   ex10 : Creates a form to input a positive integer and checks if the input number is prime, then displays the result.

simple-php-array-exercises's People

Contributors

er-hiba avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.