CS310 Assignment No 1 Fall 2023 Complete Solution By Learning With Happy Mood |CS310 assignment 1

Опубликовано: 31 Март 2026
на канале: Professor Shaista
101
2

If you want making assignments, LMS handling, projects Contact on WhatsApp 03095153290
Whatsapp Group link CS310 https://chat.whatsapp.com/Dm3bsDOCQNE...
How To install & download XAMPP/Instal
   • How To install & download XAMPP/Install//6...  

How To Run PHP Project in Xampp Server,PHP Code ko run krna ka tarika

   • How To Run PHP Project in Xampp Server,PHP...  
Assignment No. 01
Semester: Fall 2023
CS310: Open Source Web Application Development Total Marks: 20
Week Covered: 1 to 3
Due Date: 15-Nov, 2023
Instructions:

Please read the following instructions carefully before submitting the assignment. It should be clear that your assignment will not get any credit if:

 The assignment is submitted after the due date.
 The submitted assignment does not open or the file is corrupt.
 Assignment is copied (partial or full) from any source (websites, forums, students, etc.,)
 You have to upload a single .PHP file which should contain both Question1 and Question2 PHP code. Assignment in any other format (extension) will not be accepted and will be awarded zero marks.

Note: You can comment Question1 and Question2 in .php file to show separate code of both questions in a single file. On running your PHP file your file will print Question1 results and then Question2 results on screen.

Objective:

The objectives of this assignment are:

• To learn and practice the basis of PHP.
• To learn and practice using variables, echo statement, constants and string manipulation functions.

Note:

• This assignment is a Graded Assignment.
• The assignment submitted through email will not be accepted.
• This assignment is covering Lectures from Week 1-3.


Guidelines:

 Code should be properly indented.
 You can use the following tools/software for assignment development:
o Notepad, VSCode, Notpad++, XAMP, WAMP Server

For any query about the assignment, contact at [email protected].


Question # 1: Marks 10
Write a program to build a calculator in PHP which will calculate the area of the circle. Define a constant which represents the value of pi (π) i.e. 3.14159 and calcCircleArea() function to calculate area of circle. Use pi (π) constant in function to calculate the area. The value of radius of circle is 12. Finally, display the result using the echo statement.

Formula to calculate Area_Of_Circle: pi * (radius * radius)

Question # 2: Marks 10
Write a program using PHP in which you will store Virtual University of Pakistan in a variable as string then use string manipulation function to determine if a word University exists within a given string, displaying a Boolean value true if word exist otherwise display false message on screen.
#cs310
#cs310_assignent_1
#learning_with_happy_mood