Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
84 views1 page

Class-1 Assignment: Expected Output

The document contains 6 questions for a Python assignment. The questions include: 1) Writing a program to convert temperatures between Celsius and Fahrenheit. 2) Writing a program to display astrological signs based on date of birth. 3) Checking if a number is prime. 4) Printing binary numbers divisible by 5 from a given sequence. 5) Creating a multiplication table for a given number. 6) Constructing a nested loop pattern of increasing numbers.

Uploaded by

Anirban Sadhu
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)
84 views1 page

Class-1 Assignment: Expected Output

The document contains 6 questions for a Python assignment. The questions include: 1) Writing a program to convert temperatures between Celsius and Fahrenheit. 2) Writing a program to display astrological signs based on date of birth. 3) Checking if a number is prime. 4) Printing binary numbers divisible by 5 from a given sequence. 5) Creating a multiplication table for a given number. 6) Constructing a nested loop pattern of increasing numbers.

Uploaded by

Anirban Sadhu
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/ 1

Class-1

Assignment

Q1. Write a Python program to convert temperatures to and from Celsius, Fahrenheit. [ Formula: c/5 =
f-32/9 [ where c = temperature in Celsius and f = temperature in Fahrenheit]
Expected Output:
60°C is 140 in Fahrenheit
45°F is 7 in Celsius
Q2. Write a Python program to display astrological sign for a given date of birth.
Ex: Input birthday: 15
Input month of birth (e.g. march, July, etc): may
Your Astrological sign is: Taurus

Q3. Input a number a check whether it is Prime or not

Q4 Write a Python program which accepts a sequence of comma separated 4-digit binary numbers as
its input and print the numbers that are divisible by 5 in a comma separated sequence.
Sample Data: 0100,0011,1010,1001,1100,1001
Expected Output: 1010

Q5. Write a Python program to create the multiplication table (from 1 to 10) of a number. Expected
Output:
Input a number: 6
6x1=6
6 x 2 = 12
6 x 3 = 18
6 x 4 = 24
6 x 5 = 30
6 x 6 = 36
6 x 7 = 42
6 x 8 = 48
6 x 9 = 54
6 x 10 = 60

Q6. Write a Python program to construct the following pattern, using a nested loop number.
Expected Output:
1
22
333
4444
55555
666666
7777777
88888888
999999999
DR. PRADYUMNA KUMAR TRIPATHY, SILICON INSTITUTE OF TECHNOLOGY, BHUBANESWAR 1

You might also like