SlideShare a Scribd company logo
Python Practice Problems
                                K. Narsimlu (IT-Mentor)

Python Practice Problems: (Simple Programs)

In the following problems use input command. Ask the user to enter ‘a’ and ‘b’ values
and you have to find out ‘c’ value (use raw_input to get input data from key board):

1. Write a Python Program to print the following values
      a. Ex1: a=2, b=3, output c=5
      b. Ex2: a=45, b=80, output c=125
2. Write a Python Program to concatenate twostrings
      a. Ex1: string1=RGUKT string2=Basar, resultc=RGUKTBasar
3. Write a Python Program to print the following values
      a. Ex1: a=7, b=4 output c=65
      b. Ex2: a=8, b=2 output c=68
4. Write a Python Program to print the following values
      a. Ex1: a= 45, b=6 output c=3
      b. Ex1: a=11, b=2 output c=1
5. Write a Python Program to print the following values
      a. Ex1: a=225, b=15 output c=15
      b. Ex2: a=41 , b=5 output c=8
6. Write a Python Program to print the following values
      a. Ex1: a=7, b=8 output c=225
      b. Ex1: a=15, b=30 output c=2025
7. Write a Python Program to print the following values
      a. Ex1: a=113 output is 10.63
      b. Ex2: a=55 output is 7.41
8. Write a Python Program to print the following values
      a. Ex1: a=45 b=114 output is a=114, b=45
9. Write a Python Program to print the following values
      a. Ex1: a=345, b=230 output c = 460
      b. Ex2: a=45, b=330 output c = 660
10. Design your own signature logo and print it followed by “yours truly—your name.”
      a. A signature logo might look like
Python Practice Problems
                                  K. Narsimlu (IT-Mentor)



Complex Programs:

  1. Write a Python Program to ask the user to enter one integer. If the entered number
     is even. Print the given number is even or Print the given number is odd
  2.   Write a Python Program to ask the user to enter his age. If the age is greater than
       or equals to 18 then print a message “He/ she is a major”. If the age is less than
       18, then print a message that “he/she is minor”.
  3. Write a Python Program to ask the user to enter two numbers. And find out the bigger
     number. Ex: number1=50, number2=100. The output should be “Number2 is bigger”. If
     the two numbers are equal , print a message that “Two numbers are equal”
  4. Write a program, ask for the user to enter five integer values and calculate the average.
  5. You have a green lottery ticket, with ints a, b, and c on it. If the numbers are all
     different from each other, the result is 0. If all of the numbers are the same, the
     result is 20. If two of the numbers are the same, the result is 10.

                    TestCases:
                    greenTicket(1,2,3)→0
                    greenTicket(2,2,2)→20
                    greenTicket(1, 1, 2) →10
Ad

More Related Content

What's hot (20)

Classification of embedded systems
Classification of embedded systemsClassification of embedded systems
Classification of embedded systems
Vikas Dongre
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
saurav kumar
 
Harvard architecture
Harvard architectureHarvard architecture
Harvard architecture
Gichelle Amon
 
Computer Network notes (handwritten) UNIT 1
Computer Network notes (handwritten) UNIT 1Computer Network notes (handwritten) UNIT 1
Computer Network notes (handwritten) UNIT 1
NANDINI SHARMA
 
Interrupts of 8085
Interrupts of 8085Interrupts of 8085
Interrupts of 8085
ShivamSood22
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
CS_GDRCST
 
Emitter Coupled Logic (ECL)
Emitter Coupled Logic (ECL)Emitter Coupled Logic (ECL)
Emitter Coupled Logic (ECL)
shahin kadir
 
Online Student Registration System
Online Student Registration SystemOnline Student Registration System
Online Student Registration System
Sanjana Agarwal
 
Timing and control
Timing and controlTiming and control
Timing and control
chauhankapil
 
ARM CORTEX M3 PPT
ARM CORTEX M3 PPTARM CORTEX M3 PPT
ARM CORTEX M3 PPT
Gaurav Verma
 
Analysis of the source program
Analysis of the source programAnalysis of the source program
Analysis of the source program
Huawei Technologies
 
List of 8085 programs
List of 8085 programsList of 8085 programs
List of 8085 programs
ASHOKA INSTITUTE OF TECHNOLOGY & MANAGEMENT,VARANASI,U.P.
 
Embedded Systems Implementation and Applications
Embedded Systems Implementation and ApplicationsEmbedded Systems Implementation and Applications
Embedded Systems Implementation and Applications
Kaushik Padmanabhan
 
Pass Structure of Assembler
Pass Structure of AssemblerPass Structure of Assembler
Pass Structure of Assembler
International Institute of Information Technology (I²IT)
 
Lexical analyzer generator lex
Lexical analyzer generator lexLexical analyzer generator lex
Lexical analyzer generator lex
Anusuya123
 
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITSLec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Vajira Thambawita
 
Segment registers
Segment registersSegment registers
Segment registers
maamir farooq
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptx
SKUP1
 
compiler construction tool in computer science .
compiler construction tool in computer science .compiler construction tool in computer science .
compiler construction tool in computer science .
RanitHalder
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
International Islamic University
 
Classification of embedded systems
Classification of embedded systemsClassification of embedded systems
Classification of embedded systems
Vikas Dongre
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
saurav kumar
 
Harvard architecture
Harvard architectureHarvard architecture
Harvard architecture
Gichelle Amon
 
Computer Network notes (handwritten) UNIT 1
Computer Network notes (handwritten) UNIT 1Computer Network notes (handwritten) UNIT 1
Computer Network notes (handwritten) UNIT 1
NANDINI SHARMA
 
Interrupts of 8085
Interrupts of 8085Interrupts of 8085
Interrupts of 8085
ShivamSood22
 
Computer Organization and Architecture.
Computer Organization and Architecture.Computer Organization and Architecture.
Computer Organization and Architecture.
CS_GDRCST
 
Emitter Coupled Logic (ECL)
Emitter Coupled Logic (ECL)Emitter Coupled Logic (ECL)
Emitter Coupled Logic (ECL)
shahin kadir
 
Online Student Registration System
Online Student Registration SystemOnline Student Registration System
Online Student Registration System
Sanjana Agarwal
 
Timing and control
Timing and controlTiming and control
Timing and control
chauhankapil
 
Embedded Systems Implementation and Applications
Embedded Systems Implementation and ApplicationsEmbedded Systems Implementation and Applications
Embedded Systems Implementation and Applications
Kaushik Padmanabhan
 
Lexical analyzer generator lex
Lexical analyzer generator lexLexical analyzer generator lex
Lexical analyzer generator lex
Anusuya123
 
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITSLec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Lec 07 - ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS
Vajira Thambawita
 
Finite State Machine.ppt.pptx
Finite State Machine.ppt.pptxFinite State Machine.ppt.pptx
Finite State Machine.ppt.pptx
SKUP1
 
compiler construction tool in computer science .
compiler construction tool in computer science .compiler construction tool in computer science .
compiler construction tool in computer science .
RanitHalder
 

Similar to Python programs (20)

COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
shyamuopeight
 
(2 - 1) CSE1021 - Module 2 Worksheet.pdf
(2 - 1) CSE1021 - Module 2 Worksheet.pdf(2 - 1) CSE1021 - Module 2 Worksheet.pdf
(2 - 1) CSE1021 - Module 2 Worksheet.pdf
ayushagar5185
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
jody zoll
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
shyaminfo04
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
ash52393
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
Abir Hossain
 
C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2
Animesh Chaturvedi
 
17 Jo P May 08
17 Jo P May 0817 Jo P May 08
17 Jo P May 08
Ganesh Samarthyam
 
Cis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and stringsCis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and strings
CIS321
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
cskvsmi44
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
noahjamessss
 
Cp manual final
Cp manual finalCp manual final
Cp manual final
itprasad1237
 
Java Practice Set
Java Practice SetJava Practice Set
Java Practice Set
Gaurav Dixit
 
Sample Program file class 11.pdf
Sample Program file class 11.pdfSample Program file class 11.pdf
Sample Program file class 11.pdf
YashMirge2
 
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORYGE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
ANJALAI AMMAL MAHALINGAM ENGINEERING COLLEGE
 
Qust & ans inc
Qust & ans incQust & ans inc
Qust & ans inc
nayakq
 
datastructure-1 lab manual journals practical
datastructure-1  lab manual journals practicaldatastructure-1  lab manual journals practical
datastructure-1 lab manual journals practical
AlameluIyer3
 
1 ECE 175 Computer Programming for Engineering Applica.docx
1  ECE 175 Computer Programming for Engineering Applica.docx1  ECE 175 Computer Programming for Engineering Applica.docx
1 ECE 175 Computer Programming for Engineering Applica.docx
oswald1horne84988
 
Cpp Homework Help
Cpp Homework Help Cpp Homework Help
Cpp Homework Help
C++ Homework Help
 
ADLAB.pdf
ADLAB.pdfADLAB.pdf
ADLAB.pdf
ycpthalachira
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
shyamuopeight
 
(2 - 1) CSE1021 - Module 2 Worksheet.pdf
(2 - 1) CSE1021 - Module 2 Worksheet.pdf(2 - 1) CSE1021 - Module 2 Worksheet.pdf
(2 - 1) CSE1021 - Module 2 Worksheet.pdf
ayushagar5185
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
jody zoll
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
shyaminfo04
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
ash52393
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
Abir Hossain
 
C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2C - Programming Assignment 1 and 2
C - Programming Assignment 1 and 2
Animesh Chaturvedi
 
Cis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and stringsCis 170 c ilab 5 of 7 arrays and strings
Cis 170 c ilab 5 of 7 arrays and strings
CIS321
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
cskvsmi44
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
noahjamessss
 
Sample Program file class 11.pdf
Sample Program file class 11.pdfSample Program file class 11.pdf
Sample Program file class 11.pdf
YashMirge2
 
Qust & ans inc
Qust & ans incQust & ans inc
Qust & ans inc
nayakq
 
datastructure-1 lab manual journals practical
datastructure-1  lab manual journals practicaldatastructure-1  lab manual journals practical
datastructure-1 lab manual journals practical
AlameluIyer3
 
1 ECE 175 Computer Programming for Engineering Applica.docx
1  ECE 175 Computer Programming for Engineering Applica.docx1  ECE 175 Computer Programming for Engineering Applica.docx
1 ECE 175 Computer Programming for Engineering Applica.docx
oswald1horne84988
 
Ad

Recently uploaded (20)

Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Association for Project Management
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM & Mia eStudios
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...Transform tomorrow: Master benefits analysis with Gen AI today webinar,  30 A...
Transform tomorrow: Master benefits analysis with Gen AI today webinar, 30 A...
Association for Project Management
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and GuestsLDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDMMIA Reiki News Ed3 Vol1 For Team and Guests
LDM & Mia eStudios
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
puzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tensepuzzle Irregular Verbs- Simple Past Tense
puzzle Irregular Verbs- Simple Past Tense
OlgaLeonorTorresSnch
 
Drugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdfDrugs in Anaesthesia and Intensive Care,.pdf
Drugs in Anaesthesia and Intensive Care,.pdf
crewot855
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Myopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduateMyopathies (muscle disorders) for undergraduate
Myopathies (muscle disorders) for undergraduate
Mohamed Rizk Khodair
 
How to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo SlidesHow to Create Kanban View in Odoo 18 - Odoo Slides
How to Create Kanban View in Odoo 18 - Odoo Slides
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptxTERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
TERMINOLOGIES,GRIEF PROCESS AND LOSS AMD ITS TYPES .pptx
PoojaSen20
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
Ad

Python programs

  • 1. Python Practice Problems K. Narsimlu (IT-Mentor) Python Practice Problems: (Simple Programs) In the following problems use input command. Ask the user to enter ‘a’ and ‘b’ values and you have to find out ‘c’ value (use raw_input to get input data from key board): 1. Write a Python Program to print the following values a. Ex1: a=2, b=3, output c=5 b. Ex2: a=45, b=80, output c=125 2. Write a Python Program to concatenate twostrings a. Ex1: string1=RGUKT string2=Basar, resultc=RGUKTBasar 3. Write a Python Program to print the following values a. Ex1: a=7, b=4 output c=65 b. Ex2: a=8, b=2 output c=68 4. Write a Python Program to print the following values a. Ex1: a= 45, b=6 output c=3 b. Ex1: a=11, b=2 output c=1 5. Write a Python Program to print the following values a. Ex1: a=225, b=15 output c=15 b. Ex2: a=41 , b=5 output c=8 6. Write a Python Program to print the following values a. Ex1: a=7, b=8 output c=225 b. Ex1: a=15, b=30 output c=2025 7. Write a Python Program to print the following values a. Ex1: a=113 output is 10.63 b. Ex2: a=55 output is 7.41 8. Write a Python Program to print the following values a. Ex1: a=45 b=114 output is a=114, b=45 9. Write a Python Program to print the following values a. Ex1: a=345, b=230 output c = 460 b. Ex2: a=45, b=330 output c = 660 10. Design your own signature logo and print it followed by “yours truly—your name.” a. A signature logo might look like
  • 2. Python Practice Problems K. Narsimlu (IT-Mentor) Complex Programs: 1. Write a Python Program to ask the user to enter one integer. If the entered number is even. Print the given number is even or Print the given number is odd 2. Write a Python Program to ask the user to enter his age. If the age is greater than or equals to 18 then print a message “He/ she is a major”. If the age is less than 18, then print a message that “he/she is minor”. 3. Write a Python Program to ask the user to enter two numbers. And find out the bigger number. Ex: number1=50, number2=100. The output should be “Number2 is bigger”. If the two numbers are equal , print a message that “Two numbers are equal” 4. Write a program, ask for the user to enter five integer values and calculate the average. 5. You have a green lottery ticket, with ints a, b, and c on it. If the numbers are all different from each other, the result is 0. If all of the numbers are the same, the result is 20. If two of the numbers are the same, the result is 10. TestCases: greenTicket(1,2,3)→0 greenTicket(2,2,2)→20 greenTicket(1, 1, 2) →10
  翻译: