Results for solved assignment php

Assignment 2 : Control Structures and Loops

March 16, 2021

 

Assignment 2 : Control Structures and Loops

1. Write a PHP Script to display a maximum of two numbers.

Practice Programs: 

1. Write a PHP Script to display a maximum of two numbers. 

Answer : 

Assignment 2 : Control Structures and Loops Assignment 2 : Control Structures and Loops Reviewed by technical_saurabh on March 16, 2021 Rating: 5

Assignment 1: Basics in PHP

March 16, 2021

 

Assignment 1:Basics in PHP

Write a PHP script to perform arithmetic operations on two numbers (Addition, Subtraction, Multiplication Division ).


Practice Programs: 

1. Write a PHP script to perform arithmetic operations on two numbers (Addition, Subtraction, Multiplication Division ). 

Assignment 1: Basics in PHP Assignment 1: Basics in PHP Reviewed by technical_saurabh on March 16, 2021 Rating: 5

R - Programming Slip

December 28, 2020

Write a script in R to create a list of cities and perform the following

Q. Write a script in R to create a list of cities and perform the following.

Answer :

1) Give names to the elements in the list.
list_data <- ava="" br="" c="" ed="" lack="" list="" reen="" ython=""> print(list_data)
names(list_data) = c("Color", "Language(s)")
print("List with column names:")
print(list_data)
2) Add an element at the end of the list.
list_data <- ava="" br="" c="" ed="" lack="" list="" reen="" ython=""> print("List:")
print(list_data)
print("Add a new element at the end of the list:")
list_data[4] = "New element"
print("New list:")
print(list_data)
3) Remove the last element.
list_data <- ava="" br="" c="" ed="" lack="" list="" reen="" ython=""> print(list_data)
print("Remove the Last element of the list:")
list_data[2] = NULL
print("New list:")
print(list_data)
4) Update the 3rd Element
list_data <- br="" c="" ed="" lack="" list="" reen="" saurabh="" ython=""> print(list_data)
print("Update the second element of the list:")
list_data[3] = "R programming"
print("New list:")
print(list_data)

Q. Write a script in R to create two vectors of different lengths and give these vectors as input to array and print addition and subtraction of those matrices.

Answer : 

m1 = matrix(c(1, 2, 3, 4, 5, 6), nrow = 2)
print("Matrix-1:")
print(m1)
m2 = matrix(c(0, 1, 2, 3, 0, 2), nrow = 2)
print("Matrix-2:")
print(m2)

result = m1 + m2
print("Result of addition")
print(result)

result = m1 - m2
print("Result of subtraction")
print(result)


Q. Write an R Program to calculate Multiplication Table.

Answer: 

num = as.integer(readline(prompt = "Enter a number: "))
for(i in 1:10) {
print(paste(num,'x', i, '=', num*i))
}

R - Programming Slip R - Programming Slip Reviewed by technical_saurabh on December 28, 2020 Rating: 5

Assignment NO : 5 MySQL

December 24, 2020
Consider the following entities and their relationships Doctor (doc_no, doc_name, address, city, area) Hospital (hosp_no, hosp_name, hosp_city) Doctor and Hospital are related with many-many relationship. Create a RDB in 3 NF for the above and solve following Using above database, write a PHP script which accepts hospital name and print information about doctors visiting / working in that hospital in tabular format.

Program 1 : 

Consider the following entities and their relationships Doctor (doc_no, doc_name, address, city, area) Hospital (hosp_no, hosp_name, hosp_city) Doctor and Hospital are related with many-many relationship. Create a RDB in 3 NF for the above and solve following Using above database, write a PHP script which accepts hospital name and print information about doctors visiting / working in that hospital in tabular format.

Consider the following entities and their relationships Doctor (doc_no, doc_name, address, city, area) Hospital (hosp_no, hosp_name, hosp_city) Doctor and Hospital are related with many-many relationship. Create a RDB in 3 NF for the above and solve following Using above database, write a PHP script which accepts hospital name and print information about doctors visiting / working in that hospital in tabular format.

Answer : 

File : Index.php

Assignment NO : 5 MySQL Assignment NO : 5 MySQL Reviewed by technical_saurabh on December 24, 2020 Rating: 5

Assignment No : 3 Working with Forms

December 24, 2020
Program 1 : Implement calculator to convert distances between (both ways) miles and kilometres. One mile is about 1.609 kilometres. User interface (distance.html) has one text-input, two radio-buttons, submit and reset -buttons. Values are posted to PHP-script (distance.php) which calculates the conversions according the user input.

Program 1 : Implement calculator to convert distances between (both ways) miles and kilometres. One mile is about 1.609 kilometres. User interface (distance.html) has one text-input, two radio-buttons, submit and reset -buttons. Values are posted to PHP-script (distance.php) which calculates the conversions according the user input.

Answer : 

Implement calculator to convert distances between (both ways) miles and kilometres. One mile is about 1.609 kilometres.

File : distance.html




User interface (distance.html) has one text-input, two radio-buttons, submit and reset -buttons. Values are posted to PHP-script (distance.php) which calculates the conversions according the user input.

File : distance.php

Assignment No : 3 Working with Forms Assignment No : 3 Working with Forms Reviewed by technical_saurabh on December 24, 2020 Rating: 5

Assignment NO : 2 Function & Objects

December 24, 2020
: Write PHP script to define an interface which has methods area(), volume(). Define constant PI. Create a class cylinder which implements this interface and calculate area and volume.

Program 1 : Write PHP script to define an interface which has methods area(), volume(). Define constant PI. Create a class cylinder which implements this interface and calculate area and volume.

Program 1 : Write PHP script to define an interface which has methods area(), volume(). Define constant PI. Create a class cylinder which implements this interface and calculate area and volume.

Answer : 

File : Index.php

Assignment NO : 2 Function & Objects Assignment NO : 2 Function & Objects Reviewed by technical_saurabh on December 24, 2020 Rating: 5

PHP Assignment No : 1 Array & String

December 24, 2020
PHP Assignment No : 1 Array & String

Assignment NO: 1 Array & String

Program 2 : Write a menu driven PHP program to perform the following operations on an associative array: 

i.            Display the elements of an array along with the keys.

ii.           Display the size of an array

iii.          Delete an element from an array from the given index.

iv.          Reverse the order of each element’s key-value pair.[Hint: use array_flip()] 

v.           Traverse the elements in an array in random order [[Hint: use shuffle()].


Program 2 : Write a menu driven PHP program to perform the following operations on an associative array:   i.            Display the elements of an array along with the keys.  ii.           Display the size of an array  iii.          Delete an element from an array from the given index.  iv.          Reverse the order of each element’s key-value pair.[Hint: use array_flip()]   v.           Traverse the elements in an array in random order [[Hint: use shuffle()].

Answer : 

File : Index.php

PHP Assignment No : 1 Array & String PHP Assignment No : 1 Array & String Reviewed by technical_saurabh on December 24, 2020 Rating: 5

PHP Assignment No : 1 Array & String

December 24, 2020
PHP Asssignment

Program 1 : Write a PHP script for the following: Design a form to accept a string. Write a function to count the total number of vowels (a,e,i,o,u) from the string. Show the occurrences of each vowel from the string. Check whether the given string is a palindrome or not, without using built-in function. (Use radio buttons and the concept of function. Use ‘include’ construct or require stmt.)


Write a PHP script for the following: Design a form to accept a string. Write a function to count the total number of vowels (a,e,i,o,u) from the string. Show the occurrences of each vowel from the string. Check whether the given string is a palindrome or not, without using built-in function. (Use radio buttons and the concept of function. Use ‘include’ construct or require stmt.)

Answer : 

File : Index.php


File : new.php



File : new1.php

PHP Assignment No : 1 Array & String PHP Assignment No : 1  Array & String Reviewed by technical_saurabh on December 24, 2020 Rating: 5

PHP Assignment INDEX

December 24, 2020
php assignment

 INDEX

No.

Assignment Name

Date

Remark

Sign

1

Array & String

 

 

 

 

1. Accept String in form and display count of vowels & occurrence of each vowels.

 

 

 

 

2. Write a menu driven PHP program to perform the following operations on an associative array.

 

 

 

2

Function & Objects

 

 

 

 

1. Write PHP script to define an interface having area() and volume() method. Create a Cylinder class that implement interface and calculate area and volume of it.

 

 

 

 

2. Create class employee, derive emp_acc from it and emp_sal from emp-acc. And perform following menu driven options.

 

 

 

3

Working with Forms

 

 

 

 

1.Write php script to implement calculator to convert distances between (both ways) miles & km.

 

 

 

4

Storing & Protecting Data

 

 

 

 

1.Write a PHP script to keep track of number of times the web page has been accessed.

 

 

 

5

MySQL Database

 

 

 

 

Consider the following entities and their relationships Doctor & Hospital(M-M) .Write a PHP script which accepts hospital name and print information about doctors visiting / working in that hospital in tabular format.

 

 

 




Assignment No: 3 Working with Forms

1. Implement calculator to convertdistances between (both ways) miles and kilometres. One mile is about 1.609kilometres. User interface (distance.html) has one text-input, tworadio-buttons, submit and reset -buttons. Values are posted to PHP-script(distance.php) which calculates the conversions according the user input

Assignment No: 4 Storing & Protecting Data

1. Write a PHP script to keep track of numberof times the web page has been accessed.

Assignment No: 5 MySQL

1. Consider the following entities and their relationships Doctor (doc_no, doc_name, address, city, area) Hospital (hosp_no, hosp_name, hosp_city) Doctor and Hospital are related with many-many relationship. Create a RDB in 3 NF for the above and solve following Using above database, write a PHP script which accepts hospital name and print information about doctors visiting / working in that hospital in tabular format.

PHP Assignment INDEX PHP Assignment  INDEX Reviewed by technical_saurabh on December 24, 2020 Rating: 5
Powered by Blogger.