Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
5 views

Python Assignment

Python assignment

Uploaded by

honeyaylani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Python Assignment

Python assignment

Uploaded by

honeyaylani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Python Assignment – 2

I. Write a program which ask the user for a number. If number is


even print “Even” , else print ”Odd” ?
II. Write a program to print number counting from 1 to 15 ?
III. Write a program to print number counting from 5 to 25 with
increment of 2?
IV. Write a program which ask the user for a number. And check how
many number are divisible by 2 ,till that given number which is
given by user?
V. Write a program which prints all the divisors of a number
VI. Write a program to check input number is a prime number or not ?
VII. Write a program that print the number from 1 to 100. But if the
number is divisible by 2 print “{given number} is multiple by 2”
OR if the number is divisible by 3 print “{given number} is
multiple by 3” OR if the number is divisible by both 2 and 3 print
“{given number} is multiple of both 2 and 3” ?
VIII. Write a program to print all the number between 1000 and 2000
which are divisible by 7 but are not a multiple of 5 ?
IX. Write a program to take input from user and calculate factorial of a
number ?
X. Write a program to take 2 input from user ,and find a greater
number between two number ?
XI. Write a program to calculate the sum of first ten number using
Looping statement ?
XII. Write a program to check whether given is divisible by 5 or not , if
it is divisible then break the program and print that number ?
XIII. Write a program to print number counting from 1 to 15 , and check
if the number is divisible by 3 then skip that number and print
remaining number ?
XIV. Write a program to check wheather given number is divisible by 2
if its true, then perform mathematical opeartions using All
Arthmetic operator and print them one by one ?
XV. Write a program to perform All relational Operator and print them
one by one ?
XVI. Write a program to perform All Assignment Operator and Logical
Operator and print them one by one ?

You might also like