Module-1 CS-463 Mohammad Waseem Shaikh ENROLLMENT - NO-17CS002052
Module-1 CS-463 Mohammad Waseem Shaikh ENROLLMENT - NO-17CS002052
CS- 463
MOHAMMAD WASEEM SHAIKH
ENROLLMENT.NO-17CS002052
Source code:-
print(“Hello,world!”);
output:-
Hello, world!
Source code:-
num1 = 1.5
num2 = 6.3
output:-
The sum of 1.5 and 6.3 is 7.8
source code:
import cmath;
a = float ( input ( 'Enter a: ') ) b =
float ( input ( 'Enter b: ') ) c = float
( input ( 'Enter c: ') ) d = (b**2) –
(4*a*c)
output:-
Enter a: 7
Enter b: 3
Enter c: 8
The solution are (-0.214285-1.0473484j) and (-0.21428571+ 1.04734844j)
Source Code:
Celsius = 37.5
fahrenheit = ( celsius * 1.8 ) + 32
printf( ' %0.1f degree celsius is equal to %0.1f degree Fahrenheit' %
(celsius,fahrenheit))
output:
37.5 degree celsius is equal to 99.5 degree fahrenhrit
Source code:-
num = float (input(“ Enter a number : ”)) if num > 0;
printf(“ positive number”) elif
num ==0;
printf(“zero”) else
printf( “ Negative number”)
output:-
Enter a number : 2
positive number
Que.7 Program to check leap or
not.
Source code:-
if ( year % 4) == 0
if ( year % 100) == 0;
if ( year % 400 ) == 0;
print( “ { 0} is a leap year”. format(year))
else:
print( “ { 0} is not a leap year” .format(year))
else:
printf(“ { 0 } is a leap year”. format(year))
else:
printf( “ { 0} is not a leap year”.format(year))
output:-
Source
code:
num1 = 10
num2 = 14
num3 = 12
output:-
Source code:-
import sys
print( '' python version '')
print( sys.version)
print( ''version info.'')
print(sys.version_info)
Output:-
python version
3.8.2 (default , sep 6 2020, 8:21:44
[ GCC 5.4.0 201606609]
Version info.
Sys.version_info(major=3, minor=5, micro=2, releaselevel= 'final',serial=0)
Que.11 program which accepts the user's first and last name and print them in
reverse.