You are on page 1of 2

KINGDOM OF SAUDI ARABIA | JAZAN UNIVERSITY

COLLEGE OF COMPUTER SCIENCE & INFORMATION TECHNOLOGY


ASSIGNMENT (2)
Academic Year 2023 Semester Second

Course with code Introduction to Computers CSC 111 - 3 Section 5757


Type of Answer Questions Marks 10
Assignment
Date of 21 January 2023 Deadline 05 February 2023
Announcement
Student Name: ID:

Answer all the following questions.


ASSIGNMENT PROBLEM STATEMENT
1-Write the output from the following code:
word = ‘JAZAN UNIVERSITY’
count = 0
for letter in word:
if letter = = ‘A’ :
count = count +1
print (count)
Solution

2- Write a Python program which accepts the radius of a circle from the user and compute the area of
that circle.
Solution:
3- Write a Python function that takes a positive integer and returns the cube of the positive integer.
Solution:

4- Write python code using while loop to print numbers from 1 to 20


Solution:

5- write python code using nested if condition to compare between student’s marks and print
whether the student is pass or fail.
Solution:

NOTE: 1. Submit assignment within due date. Late assignment submission will not be allowed.
2. Marks will be given on basis of submitted assignment.
3. Only soft copy assignments will be accepted (No handwritten). Assignment will be accepted through BLACKBOARD.
--------------------------------------------------- END of Assignment -------------------------------------------------------
With my best of wishes

You might also like