SlideShare a Scribd company logo
1 of 1
Download to read offline
im working in python and cannot figure out how to get my code to print true and false without
using a string
Write a boolean-valued function is_odd inumber) that takes an integer parameter number and
returns True if and only if number is odd. Hint: In Learning Module 1 you learned about the
remainder (or modulo) operator s. It will be helpful here. What remainder do you get when you
divide an even number by 2 ? What about an odd number? For example: begin{tabular}{|l|l|}
hline Test & Result  hline print ( is_odd 1 )) & True  hline print ( i 5_ odd 2 ) ) & False 
hline print(i5_odd { 321 ) & True  hline end{tabular} Answer: (penalty regime: 0% )
begin{tabular}{|l|l} hline 1 & def is odd(number):  2 & "Returns a odd number as true"  3 &
if number ' 2 0 :  4 & return ("False")  5 & else:  6 & return("True") end{tabular}
Scratchpad 1 |is_odd(number) Run Prefix with Answer Check begin{tabular}{|l|l|l|l|} hline &
Test & Expected & Got  hline & print { is_add ( 1 )} & True & True  hline & print { i s_add
( 2 )} & False & False  hline & print { 1 s_add ( 321 )) & True & True  hline X & print { t y
p e ( is_odd ( 411 ))} & eclass 'bool's x  hline end{tabular}

More Related Content

Similar to im working in python and cannot figure out how to get my code to print.pdf

Operators
OperatorsOperators
OperatorsKamran
 
#include fstream#include iostream#include cstdlib#includ.docx
#include fstream#include iostream#include cstdlib#includ.docx#include fstream#include iostream#include cstdlib#includ.docx
#include fstream#include iostream#include cstdlib#includ.docxajoy21
 
For Loops and Variables in Java
For Loops and Variables in JavaFor Loops and Variables in Java
For Loops and Variables in JavaPokequesthero
 
Programming basics
Programming basicsProgramming basics
Programming basicsillidari
 
03 Logical functions.pdf
03 Logical functions.pdf03 Logical functions.pdf
03 Logical functions.pdfRizwanAli988729
 
Scilab as a calculator
Scilab as a calculatorScilab as a calculator
Scilab as a calculatorScilab
 
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docxCMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docxmary772
 
ICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxssuser2f67c91
 
276939732-P66-M1-B12-E.pdf
276939732-P66-M1-B12-E.pdf276939732-P66-M1-B12-E.pdf
276939732-P66-M1-B12-E.pdfsebastien25
 
Course project solutions 2018
Course project solutions 2018Course project solutions 2018
Course project solutions 2018Robert Geofroy
 

Similar to im working in python and cannot figure out how to get my code to print.pdf (20)

Operators
OperatorsOperators
Operators
 
Chap 4 c++
Chap 4 c++Chap 4 c++
Chap 4 c++
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
#include fstream#include iostream#include cstdlib#includ.docx
#include fstream#include iostream#include cstdlib#includ.docx#include fstream#include iostream#include cstdlib#includ.docx
#include fstream#include iostream#include cstdlib#includ.docx
 
17 Jo P May 08
17 Jo P May 0817 Jo P May 08
17 Jo P May 08
 
Chap 4 c++
Chap 4 c++Chap 4 c++
Chap 4 c++
 
For Loops and Variables in Java
For Loops and Variables in JavaFor Loops and Variables in Java
For Loops and Variables in Java
 
Python Control structures
Python Control structuresPython Control structures
Python Control structures
 
Programming basics
Programming basicsProgramming basics
Programming basics
 
03 Logical functions.pdf
03 Logical functions.pdf03 Logical functions.pdf
03 Logical functions.pdf
 
Scilab as a calculator
Scilab as a calculatorScilab as a calculator
Scilab as a calculator
 
Programming egs
Programming egs Programming egs
Programming egs
 
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docxCMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
 
C language basics
C language basicsC language basics
C language basics
 
Chap 4 c++
Chap 4 c++Chap 4 c++
Chap 4 c++
 
ICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptxICT_Seminar_flow_charts_for_2013_Nov.pptx
ICT_Seminar_flow_charts_for_2013_Nov.pptx
 
276939732-P66-M1-B12-E.pdf
276939732-P66-M1-B12-E.pdf276939732-P66-M1-B12-E.pdf
276939732-P66-M1-B12-E.pdf
 
Course project solutions 2018
Course project solutions 2018Course project solutions 2018
Course project solutions 2018
 
GE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_NotesGE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_Notes
 
Conditional Statements
Conditional StatementsConditional Statements
Conditional Statements
 

More from adhityalapcare

In 2022- Lisa and Fred- a married couple- had taxable income of $305-4.pdf
In 2022- Lisa and Fred- a married couple- had taxable income of $305-4.pdfIn 2022- Lisa and Fred- a married couple- had taxable income of $305-4.pdf
In 2022- Lisa and Fred- a married couple- had taxable income of $305-4.pdfadhityalapcare
 
In 2021- Montana Corp- entered into a contract to begin work on a two-.pdf
In 2021- Montana Corp- entered into a contract to begin work on a two-.pdfIn 2021- Montana Corp- entered into a contract to begin work on a two-.pdf
In 2021- Montana Corp- entered into a contract to begin work on a two-.pdfadhityalapcare
 
In 2022 - Laureen is currently single- She paid $2-800 of qualified tu.pdf
In 2022 - Laureen is currently single- She paid $2-800 of qualified tu.pdfIn 2022 - Laureen is currently single- She paid $2-800 of qualified tu.pdf
In 2022 - Laureen is currently single- She paid $2-800 of qualified tu.pdfadhityalapcare
 
In 2020- Rocket inc- had reported a deferred tax asset of $106 million.pdf
In 2020- Rocket inc- had reported a deferred tax asset of $106 million.pdfIn 2020- Rocket inc- had reported a deferred tax asset of $106 million.pdf
In 2020- Rocket inc- had reported a deferred tax asset of $106 million.pdfadhityalapcare
 
implementation of virtual care Detailed Communication plan is compile.pdf
implementation of virtual care  Detailed Communication plan is compile.pdfimplementation of virtual care  Detailed Communication plan is compile.pdf
implementation of virtual care Detailed Communication plan is compile.pdfadhityalapcare
 
In 2019 there were $3-4 trillion in mergers and acquisitions worldwide.pdf
In 2019 there were $3-4 trillion in mergers and acquisitions worldwide.pdfIn 2019 there were $3-4 trillion in mergers and acquisitions worldwide.pdf
In 2019 there were $3-4 trillion in mergers and acquisitions worldwide.pdfadhityalapcare
 
implement trylexcept excepsion handler to catch all errors drom the fo.pdf
implement trylexcept excepsion handler to catch all errors drom the fo.pdfimplement trylexcept excepsion handler to catch all errors drom the fo.pdf
implement trylexcept excepsion handler to catch all errors drom the fo.pdfadhityalapcare
 
In 2012- Northland had real GDP of $4-21 billion and a population of 2.pdf
In 2012- Northland had real GDP of $4-21 billion and a population of 2.pdfIn 2012- Northland had real GDP of $4-21 billion and a population of 2.pdf
In 2012- Northland had real GDP of $4-21 billion and a population of 2.pdfadhityalapcare
 
In 2015 - the Hawai'i State Legislature passed a bill that sets a goal.pdf
In 2015 - the Hawai'i State Legislature passed a bill that sets a goal.pdfIn 2015 - the Hawai'i State Legislature passed a bill that sets a goal.pdf
In 2015 - the Hawai'i State Legislature passed a bill that sets a goal.pdfadhityalapcare
 
In 2015- Los Angeles sued Wells Fargo for unethical customer conduct-.pdf
In 2015- Los Angeles sued Wells Fargo for unethical customer conduct-.pdfIn 2015- Los Angeles sued Wells Fargo for unethical customer conduct-.pdf
In 2015- Los Angeles sued Wells Fargo for unethical customer conduct-.pdfadhityalapcare
 
In 2001- the federal government enacted a law that forbade any student.pdf
In 2001- the federal government enacted a law that forbade any student.pdfIn 2001- the federal government enacted a law that forbade any student.pdf
In 2001- the federal government enacted a law that forbade any student.pdfadhityalapcare
 
In 2000 - the CPI was 152-5- and the price of an economics textbook wa.pdf
In 2000 - the CPI was 152-5- and the price of an economics textbook wa.pdfIn 2000 - the CPI was 152-5- and the price of an economics textbook wa.pdf
In 2000 - the CPI was 152-5- and the price of an economics textbook wa.pdfadhityalapcare
 
In 1994- 52- of parents with children in high school felt that it was.pdf
In 1994- 52- of parents with children in high school felt that it was.pdfIn 1994- 52- of parents with children in high school felt that it was.pdf
In 1994- 52- of parents with children in high school felt that it was.pdfadhityalapcare
 
In 1626- Dutchman Peter Minuit purchased Manhattan Island from a local.pdf
In 1626- Dutchman Peter Minuit purchased Manhattan Island from a local.pdfIn 1626- Dutchman Peter Minuit purchased Manhattan Island from a local.pdf
In 1626- Dutchman Peter Minuit purchased Manhattan Island from a local.pdfadhityalapcare
 
In 1945- the United Nation was formed to replace _____- Responses- NAT.pdf
In 1945- the United Nation was formed to replace _____- Responses- NAT.pdfIn 1945- the United Nation was formed to replace _____- Responses- NAT.pdf
In 1945- the United Nation was formed to replace _____- Responses- NAT.pdfadhityalapcare
 
imported a data file with 7 variables how can i take two variables cal.pdf
imported a data file with 7 variables how can i take two variables cal.pdfimported a data file with 7 variables how can i take two variables cal.pdf
imported a data file with 7 variables how can i take two variables cal.pdfadhityalapcare
 
Imagine that you are an environmental scientist who has been hired to.pdf
Imagine that you are an environmental scientist who has been hired to.pdfImagine that you are an environmental scientist who has been hired to.pdf
Imagine that you are an environmental scientist who has been hired to.pdfadhityalapcare
 
ILLUSTRATION 21 P Company Pro Forma Balance Sheet Giving Effect to Pro.pdf
ILLUSTRATION 21 P Company Pro Forma Balance Sheet Giving Effect to Pro.pdfILLUSTRATION 21 P Company Pro Forma Balance Sheet Giving Effect to Pro.pdf
ILLUSTRATION 21 P Company Pro Forma Balance Sheet Giving Effect to Pro.pdfadhityalapcare
 
Ifyou have an embryo composed of multiple layers of cells- You examine.pdf
Ifyou have an embryo composed of multiple layers of cells- You examine.pdfIfyou have an embryo composed of multiple layers of cells- You examine.pdf
Ifyou have an embryo composed of multiple layers of cells- You examine.pdfadhityalapcare
 
If you have the following resources- a- Programmer analyst b- Software.pdf
If you have the following resources- a- Programmer analyst b- Software.pdfIf you have the following resources- a- Programmer analyst b- Software.pdf
If you have the following resources- a- Programmer analyst b- Software.pdfadhityalapcare
 

More from adhityalapcare (20)

In 2022- Lisa and Fred- a married couple- had taxable income of $305-4.pdf
In 2022- Lisa and Fred- a married couple- had taxable income of $305-4.pdfIn 2022- Lisa and Fred- a married couple- had taxable income of $305-4.pdf
In 2022- Lisa and Fred- a married couple- had taxable income of $305-4.pdf
 
In 2021- Montana Corp- entered into a contract to begin work on a two-.pdf
In 2021- Montana Corp- entered into a contract to begin work on a two-.pdfIn 2021- Montana Corp- entered into a contract to begin work on a two-.pdf
In 2021- Montana Corp- entered into a contract to begin work on a two-.pdf
 
In 2022 - Laureen is currently single- She paid $2-800 of qualified tu.pdf
In 2022 - Laureen is currently single- She paid $2-800 of qualified tu.pdfIn 2022 - Laureen is currently single- She paid $2-800 of qualified tu.pdf
In 2022 - Laureen is currently single- She paid $2-800 of qualified tu.pdf
 
In 2020- Rocket inc- had reported a deferred tax asset of $106 million.pdf
In 2020- Rocket inc- had reported a deferred tax asset of $106 million.pdfIn 2020- Rocket inc- had reported a deferred tax asset of $106 million.pdf
In 2020- Rocket inc- had reported a deferred tax asset of $106 million.pdf
 
implementation of virtual care Detailed Communication plan is compile.pdf
implementation of virtual care  Detailed Communication plan is compile.pdfimplementation of virtual care  Detailed Communication plan is compile.pdf
implementation of virtual care Detailed Communication plan is compile.pdf
 
In 2019 there were $3-4 trillion in mergers and acquisitions worldwide.pdf
In 2019 there were $3-4 trillion in mergers and acquisitions worldwide.pdfIn 2019 there were $3-4 trillion in mergers and acquisitions worldwide.pdf
In 2019 there were $3-4 trillion in mergers and acquisitions worldwide.pdf
 
implement trylexcept excepsion handler to catch all errors drom the fo.pdf
implement trylexcept excepsion handler to catch all errors drom the fo.pdfimplement trylexcept excepsion handler to catch all errors drom the fo.pdf
implement trylexcept excepsion handler to catch all errors drom the fo.pdf
 
In 2012- Northland had real GDP of $4-21 billion and a population of 2.pdf
In 2012- Northland had real GDP of $4-21 billion and a population of 2.pdfIn 2012- Northland had real GDP of $4-21 billion and a population of 2.pdf
In 2012- Northland had real GDP of $4-21 billion and a population of 2.pdf
 
In 2015 - the Hawai'i State Legislature passed a bill that sets a goal.pdf
In 2015 - the Hawai'i State Legislature passed a bill that sets a goal.pdfIn 2015 - the Hawai'i State Legislature passed a bill that sets a goal.pdf
In 2015 - the Hawai'i State Legislature passed a bill that sets a goal.pdf
 
In 2015- Los Angeles sued Wells Fargo for unethical customer conduct-.pdf
In 2015- Los Angeles sued Wells Fargo for unethical customer conduct-.pdfIn 2015- Los Angeles sued Wells Fargo for unethical customer conduct-.pdf
In 2015- Los Angeles sued Wells Fargo for unethical customer conduct-.pdf
 
In 2001- the federal government enacted a law that forbade any student.pdf
In 2001- the federal government enacted a law that forbade any student.pdfIn 2001- the federal government enacted a law that forbade any student.pdf
In 2001- the federal government enacted a law that forbade any student.pdf
 
In 2000 - the CPI was 152-5- and the price of an economics textbook wa.pdf
In 2000 - the CPI was 152-5- and the price of an economics textbook wa.pdfIn 2000 - the CPI was 152-5- and the price of an economics textbook wa.pdf
In 2000 - the CPI was 152-5- and the price of an economics textbook wa.pdf
 
In 1994- 52- of parents with children in high school felt that it was.pdf
In 1994- 52- of parents with children in high school felt that it was.pdfIn 1994- 52- of parents with children in high school felt that it was.pdf
In 1994- 52- of parents with children in high school felt that it was.pdf
 
In 1626- Dutchman Peter Minuit purchased Manhattan Island from a local.pdf
In 1626- Dutchman Peter Minuit purchased Manhattan Island from a local.pdfIn 1626- Dutchman Peter Minuit purchased Manhattan Island from a local.pdf
In 1626- Dutchman Peter Minuit purchased Manhattan Island from a local.pdf
 
In 1945- the United Nation was formed to replace _____- Responses- NAT.pdf
In 1945- the United Nation was formed to replace _____- Responses- NAT.pdfIn 1945- the United Nation was formed to replace _____- Responses- NAT.pdf
In 1945- the United Nation was formed to replace _____- Responses- NAT.pdf
 
imported a data file with 7 variables how can i take two variables cal.pdf
imported a data file with 7 variables how can i take two variables cal.pdfimported a data file with 7 variables how can i take two variables cal.pdf
imported a data file with 7 variables how can i take two variables cal.pdf
 
Imagine that you are an environmental scientist who has been hired to.pdf
Imagine that you are an environmental scientist who has been hired to.pdfImagine that you are an environmental scientist who has been hired to.pdf
Imagine that you are an environmental scientist who has been hired to.pdf
 
ILLUSTRATION 21 P Company Pro Forma Balance Sheet Giving Effect to Pro.pdf
ILLUSTRATION 21 P Company Pro Forma Balance Sheet Giving Effect to Pro.pdfILLUSTRATION 21 P Company Pro Forma Balance Sheet Giving Effect to Pro.pdf
ILLUSTRATION 21 P Company Pro Forma Balance Sheet Giving Effect to Pro.pdf
 
Ifyou have an embryo composed of multiple layers of cells- You examine.pdf
Ifyou have an embryo composed of multiple layers of cells- You examine.pdfIfyou have an embryo composed of multiple layers of cells- You examine.pdf
Ifyou have an embryo composed of multiple layers of cells- You examine.pdf
 
If you have the following resources- a- Programmer analyst b- Software.pdf
If you have the following resources- a- Programmer analyst b- Software.pdfIf you have the following resources- a- Programmer analyst b- Software.pdf
If you have the following resources- a- Programmer analyst b- Software.pdf
 

Recently uploaded

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 

im working in python and cannot figure out how to get my code to print.pdf

  • 1. im working in python and cannot figure out how to get my code to print true and false without using a string Write a boolean-valued function is_odd inumber) that takes an integer parameter number and returns True if and only if number is odd. Hint: In Learning Module 1 you learned about the remainder (or modulo) operator s. It will be helpful here. What remainder do you get when you divide an even number by 2 ? What about an odd number? For example: begin{tabular}{|l|l|} hline Test & Result hline print ( is_odd 1 )) & True hline print ( i 5_ odd 2 ) ) & False hline print(i5_odd { 321 ) & True hline end{tabular} Answer: (penalty regime: 0% ) begin{tabular}{|l|l} hline 1 & def is odd(number): 2 & "Returns a odd number as true" 3 & if number ' 2 0 : 4 & return ("False") 5 & else: 6 & return("True") end{tabular} Scratchpad 1 |is_odd(number) Run Prefix with Answer Check begin{tabular}{|l|l|l|l|} hline & Test & Expected & Got hline & print { is_add ( 1 )} & True & True hline & print { i s_add ( 2 )} & False & False hline & print { 1 s_add ( 321 )) & True & True hline X & print { t y p e ( is_odd ( 411 ))} & eclass 'bool's x hline end{tabular}