Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
4 views
11 pages
Pps File
Hrjdisosoaznznhdid9w01028373g4v4vrvfhxuisjssnwb8e92i2jejdke929281872838rid
Uploaded by
mayuratakare9552
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save pps file For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
4 views
11 pages
Pps File
Hrjdisosoaznznhdid9w01028373g4v4vrvfhxuisjssnwb8e92i2jejdke929281872838rid
Uploaded by
mayuratakare9552
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save pps file For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 11
Search
Fullscreen
Programiz Python Online Compiler main.py 2G Sove princ("Onkar_pacil") princ(*Roll_NO.D34") 1 2 3 4° N =int(input("Enter number of elements you want in list:")) 5 Data = [] 6 7+ for i in range (N): 8 x = anc(inpuc("Enter number: ")) 9 Data append(x) 10 princ(*Last 4s : *.Daca) WW Even = [] 12 Odd =] 13+ for x in Data 14- if(x %2 == 0) 15 Even. append(x) 16- else: 7 Odd .append(x) 18 princ( "List of even numbers is : ",Even) 19 print(*List of odd numbers is : “,Odd) © scanned with OKEN ScannerOutput Onkar_Patil Roll_NO.D34 Encer Encer Enter Enter Enter Enter Lise 1s runber Punber punber nunber nunber runber of elements you want in lists 04 05 07 " 34 4,5, 7, 11, 34 Lise of even numbers is : [4, 34] Lise of odd numbers is : (5, 7, 11] Code Execution Successful = Cleer © scanned with OKEN ScannerProgramiz Python Online Compiler main.py 25 G&G Save En print(*Onkar_Patil™) princ("Roll_No.D34") #(A) inbuilt functions (squareroot, square, cube) import math num = int(input("Enter number to find squreroot, square and cube of number = ")) 7 squareroot = math.sqrt(num) 8 print("Squareroot of", num, “using inbuilt function is: “,squarercot) 9 square = macth.pow(nun, 2) 10 print("\nSquare of", num, “using inbuilt function is: ",square) 11 cube = math.pow(num, 3) 12. print("\nCube of", num, “using inbuilt function is: ", cube) 13, auweuna © scanned with OKEN ScannerProgramiz PRO > Output Clear Onkar_Patil Roll_No.D34 Enter number to find squreroot, square and cube of number : 4 Squareroot of 4 using inbuilt function is: 2.0 Square of 4 using inbuilt function is: 16.0 Cube of 4 using inbuilt function is: 64.0 Code Execution Successful = © scanned with OKEN Scannerjopramiz Python Online Compiler main.py af prant(*Onker_Patil") print(*Roll_No.34") ylargest number ,Prime number) S+ def fabonacci() 4(B) User defined functions (Fibonacci series, Factorial, Pallindrone 6 Mo = int(input(*Enter number till which you want to print fibonaccd series: ")) 7 first_val = 0 8 second_val = 1 9 1=0 10> whiLe(a
def checkprime() 24 um=inc(input(*Enter nurber to check prine or not ")) 25* for i in range(2,num) 26+ Af (num % 1 0): 27 print (num, "is not a prime number") 28 break 29+ else: 30 print (num, "is a prime number") SD) break 32> def largest(): 3 intCinput(*Enter first number:")) 34 ntCinput(*Enter second number:")) 35 ne3=ancCinpur(“Enter third number:")) 36- —-Af(no1>no2) end (noz>n03): 7 princ(not,*is largest number*) 38> eli f(no2>no3): © scanned with OKEN Scannerjogramiz Python Online Compiler mainpy 2G) soe SE 39 print(nol,"is largest number") 40~ else a princ(no3,*1s largest nunber*) 42. # (C) Sinple calculator operations using menu driven funcezons 43~ def add(): 4a Nol = int(inpuc("Encer first number: ")) as. No2 = int(input(“Enter second number : “)) 46 Mo3+Not = Noz 47 print("Addition of numbers is : ", No3) 48+ def subtract() 49 Nol = int(inpuc("Encer first number: ")) 50 No2= int(input( "Enter second number: ")) 51 No3 =No1-No2 52, print("Subtraction of numbers is - ",No3) 53+ def multiplication() 54 Not = int(inpuc("Encer first number > ")) 55 No2 = int(inpuc("Enter second number : ")) 56 No3=No1*No2 57 princ("Mulciplication of numbers is : *, No3) . © scanned with OKEN Scanner? amiz Python Online Compiler main.py at 57 print("Nultiplicacion of numbers 1s No3) 58 def division() 59 Not = int(input("Enter first number = ")) 60 No2 = int(input("Enter second number = *)) 6 No3-Not / No2 62 princ("Addition of nunbers is : ", No3) 63 64 print(*\n-- -Nenu- 4 65 princ(*\nTo print fabonacct series, enter 1") 68 print¢"To print factorial of number, enter 2") 67 print("To Check prime number, enter 3") 68 print("To print largest number, enter 4") 69 print(*To print addition of numbers, enter 5") 70 print(*To print subtraction of numbers, enter 6") 71 print(*To print mulciplication of numbers, enter 7") 72 print(*To print division of numbers, enter 8") 73 princ(*To exit enter 0") 74 75> while(1) 18 choice=(ine(inpuc("\nenter option = "))) © scanned with OKEN ScannerProgramiz Python Online Compiler main.py s&s ES 1): T+ Af (choice 78 fabonacci() 79° elif (choice == 2) 80 factortal() Bly elif (choice == 3): 82 checkPrime() 83+ elif (choice 4): 84 lergest() 85- elif (choice == 5): | 86 addQ) 87> elif (choice 6): 83 subtract() 89° elif (choice : 90 multiplicationt Ne elif (choice 8) 92 division() 93- elif (choice 0): 98 Princ("\nProgram execution stopped") 95 exit() 96 © scanned with OKEN ScannerProgramiz PRO > Output Clear Onkar_Patil . Roll_No.34 Menu: To print fabonacct series, enter 1 To print factorial of number, enter 2 To Check prime number, enter 3 To print largest number, enter 4 To print addition of numbers, enter 5 To print subtraction of numbers, enter 6 To print multiplication of numbers, enter 7 To print division of numbers, enter 8 To exit enter 0 Enter option : 2 Enter number to get factorial: 5 Factorial of 5 is 120 © scanned with OKEN ScannerOutput To To To To To To To To To print fabonacei series, enter 1 print factorial of number, enter 2 Check prime number, enter 3 prant largest number, enter 4 print addition of nutbers, enter 5 print subtraction of numbers, enter 6 Print multiplication of numbers, enter 7 print division of numbers, enter 8 exic encer 0 Enter option : 2 Enter number ro ger factorial 5 Factorial of 5 is 120 Enter option : 0 Program execution stopped Code Execution Successful === Clear © scanned with OKEN Scanner
You might also like
Python Interview Questions and Answers With Code # Python
PDF
No ratings yet
Python Interview Questions and Answers With Code # Python
15 pages
BSC Cs Pratical
PDF
No ratings yet
BSC Cs Pratical
20 pages
Python Programs1
PDF
No ratings yet
Python Programs1
7 pages
Practical Programs
PDF
No ratings yet
Practical Programs
9 pages
DS Assignment 1 2
PDF
No ratings yet
DS Assignment 1 2
16 pages
Class 11 - Practical Ex 01 - 10 - 2024-25
PDF
No ratings yet
Class 11 - Practical Ex 01 - 10 - 2024-25
21 pages
PP Journal Programs 1 To 13
PDF
No ratings yet
PP Journal Programs 1 To 13
42 pages
Flow of Control Book Programs
PDF
No ratings yet
Flow of Control Book Programs
9 pages
Wa0006.
PDF
No ratings yet
Wa0006.
13 pages
Adobe Scan 08-Feb-2024
PDF
No ratings yet
Adobe Scan 08-Feb-2024
17 pages
Python Assignment-Vrattesh Anand
PDF
No ratings yet
Python Assignment-Vrattesh Anand
85 pages
Taufikpy
PDF
No ratings yet
Taufikpy
24 pages
Puma g7 User Manual (Ansari)
PDF
0% (1)
Puma g7 User Manual (Ansari)
81 pages
DSA Assignmet 1
PDF
No ratings yet
DSA Assignmet 1
14 pages
Python Practice Examples
PDF
No ratings yet
Python Practice Examples
80 pages
Python Programming
PDF
No ratings yet
Python Programming
29 pages
TXT
PDF
No ratings yet
TXT
58 pages
Week 10
PDF
No ratings yet
Week 10
15 pages
Python Examples
PDF
No ratings yet
Python Examples
13 pages
Programs From Module1
PDF
No ratings yet
Programs From Module1
6 pages
Adjusted Python Lab Solutions
PDF
No ratings yet
Adjusted Python Lab Solutions
4 pages
Question1 - Class 12 Practical Record Prg-Combined
PDF
No ratings yet
Question1 - Class 12 Practical Record Prg-Combined
39 pages
Adobe Scan Jan 16, 2025
PDF
No ratings yet
Adobe Scan Jan 16, 2025
8 pages
Python Programs Niyati
PDF
No ratings yet
Python Programs Niyati
15 pages
24 Bai 10773
PDF
No ratings yet
24 Bai 10773
16 pages
Python Record (AIML)
PDF
No ratings yet
Python Record (AIML)
64 pages
Multipurpose Calculator Project Report GROUP 1
PDF
No ratings yet
Multipurpose Calculator Project Report GROUP 1
15 pages
Class XIth Term 1 Comp - Sci Practical File
PDF
No ratings yet
Class XIth Term 1 Comp - Sci Practical File
17 pages
Python Program
PDF
No ratings yet
Python Program
6 pages
Practical File of Programming Ith Python Chetna Rani
PDF
No ratings yet
Practical File of Programming Ith Python Chetna Rani
18 pages
Assignment1
PDF
No ratings yet
Assignment1
3 pages
PROGAM of 11
PDF
No ratings yet
PROGAM of 11
7 pages
Python Practical File GIRI
PDF
No ratings yet
Python Practical File GIRI
10 pages
Easy Level Practice Prgms
PDF
No ratings yet
Easy Level Practice Prgms
12 pages
Python Programs
PDF
No ratings yet
Python Programs
2 pages
23UPCS35 - Python Programming Lab
PDF
No ratings yet
23UPCS35 - Python Programming Lab
34 pages
Python Example
PDF
No ratings yet
Python Example
43 pages
Python Project - 240407 - 220903
PDF
No ratings yet
Python Project - 240407 - 220903
15 pages
Python Assignment 3
PDF
No ratings yet
Python Assignment 3
10 pages
Subhojit Ghosh Class XI (Science) Roll No 115
PDF
No ratings yet
Subhojit Ghosh Class XI (Science) Roll No 115
12 pages
Python Programs
PDF
No ratings yet
Python Programs
79 pages
Bermudra Triangle Laiba Bomber Labrador Leebra Lizbraa Cockroach Giraffe
PDF
No ratings yet
Bermudra Triangle Laiba Bomber Labrador Leebra Lizbraa Cockroach Giraffe
13 pages
PROJECT
PDF
No ratings yet
PROJECT
31 pages
Intership 1st Week Task
PDF
No ratings yet
Intership 1st Week Task
22 pages
Practical File 2023-2024 Final
PDF
No ratings yet
Practical File 2023-2024 Final
31 pages
A Program He Product Al: Produet o
PDF
No ratings yet
A Program He Product Al: Produet o
10 pages
Computer Science With Pyhton Practical File
PDF
No ratings yet
Computer Science With Pyhton Practical File
43 pages
Program For Fibonacci Series
PDF
No ratings yet
Program For Fibonacci Series
6 pages
HHW IP - Merged
PDF
No ratings yet
HHW IP - Merged
10 pages
Modified 11th CBSE CS Practical
PDF
No ratings yet
Modified 11th CBSE CS Practical
14 pages
SageMath Lecture 8
PDF
No ratings yet
SageMath Lecture 8
14 pages
Python Practical File
PDF
No ratings yet
Python Practical File
19 pages
PRINTOUT
PDF
No ratings yet
PRINTOUT
12 pages
Python Assignment
PDF
No ratings yet
Python Assignment
13 pages
Python Practical Programs
PDF
No ratings yet
Python Practical Programs
5 pages
Python PRACTICE PROGRAMS
PDF
No ratings yet
Python PRACTICE PROGRAMS
15 pages
Python Programs
PDF
No ratings yet
Python Programs
6 pages
Lokesh Hero
PDF
No ratings yet
Lokesh Hero
42 pages
Lokesh
PDF
No ratings yet
Lokesh
31 pages