i have 10 python programming questions half of the questions.docx

4

course material

i have 10 python programming questions half of the questions and half of
the programming part i have attached the questions file please go
through it
TASK TWO: OPERATORS AND DECISION MAKING STATEMENT1.Write a program in Python
to perform the following operation:If a number is divisible by 3 it should print
“Consultadd” as a stringIf a number is divisible by 5 it should print “c” as a
stringIf a number is divisible by both 3 and 5 it should print “Consultadd Python
Training― as a string.2. Write a program in Python to perform the following operator
based task:Ask user to choose the following option first:If User Enter 1 – AdditionIf User
Enter 2 – SubtractionIf User Enter 3 – DivisionIf USer Enter 4 – MultiplicationIf User Enter 5
– AverageAsk user to enter the 2 numbers in a variable for first and second for the first 4
options mentioned above.Ask user to enter two more numbers as first1 and second2 for
calculating the average as soon as user choose an option 5.At the end if the answer of any
operation is Negative print a statement saying “zsa―NOTE: At a time user can
perform one action at a time.3. Write a program in Python to implement the given
flowchart:4. Write a program in Python to break and continue if the following cases
occurs:If user enters a negative number just break the loop and print “It’s Over―If
user enters a positive number just continue in the loop and print “Good Going―5.
Write a program in Python which will find all such numbers which are divisible by 7 but are
not a multiple of 5, between 2000 and 3200.6. What is the output of the following code
examples?x=123for i in x:print(i)i = 0while i < 5:print(i)i += 1if i ==
3:breakelse:print(“error―)count = 0while True:print(count)count += 1if count >=
5:Break7. Write a program that prints all the numbers from 0 to 6 except 3 and 6.Expected
output: 0 1 2 4 5Note: Use ‘continue’ statement8. Write a program that accepts a
string as an input from user and calculate the number of digits and letters.Expected output:
consul12Letters 6Digits 29. Read the two parts of the question below:Write a program such
that it asks users to “guess the lucky number―. If the correct number is guessed the
program stops, otherwise it continues forever.Modify the program so that it asks users
whether they want to guess again each time. Use two variables, ‘number’ for the
number and ‘answer’ for the answer to the question whether they want to continue
guessing. The program stops if the user guesses the correct number or answers “no―.
( The program continues as long as a user has not answered “no― and has not
guessed the correct number)10. Write a program that asks five times to guess the lucky
number. Use a while loop and a counter, such ascounter=1While counter <=
5:print(“Type in the”, counter, “number”counter=counter+1The program asks
for five guesses (no matter whether the correct number was guessed or not). If the correct
number is guessed, the program outputs “Good guess!―, otherwise it outputs “Try
again!”. After the fifth guess it stops and prints “Game over!”.11. In the previous
question, insert “break” after the “Good guess!” print statement.
“break― will terminate the while loop so that users do not have to continue guessing
after they found the number. If the user does not guess the number at all, print “Sorry
but that was not very successful―.

Recomendados

Write the program that reads two numbers from the keyboard. It.docx por
Write the program that reads two numbers from the keyboard. It.docxWrite the program that reads two numbers from the keyboard. It.docx
Write the program that reads two numbers from the keyboard. It.docxannetnash8266
2 vistas3 diapositivas
working with loops and if statements working with random numbers Pro.docx por
 working with loops and if statements  working with random numbers Pro.docx working with loops and if statements  working with random numbers Pro.docx
working with loops and if statements working with random numbers Pro.docxajoy21
2 vistas2 diapositivas
Summary In this lab- you complete a prewritten Python program that com.docx por
Summary In this lab- you complete a prewritten Python program that com.docxSummary In this lab- you complete a prewritten Python program that com.docx
Summary In this lab- you complete a prewritten Python program that com.docxStewartt0kJohnstonh
18 vistas2 diapositivas
Number of Questions 111. The Python program below has an erro.docx por
Number of Questions 111. The Python program below has an erro.docxNumber of Questions 111. The Python program below has an erro.docx
Number of Questions 111. The Python program below has an erro.docxdunhamadell
2 vistas4 diapositivas
in c++ Your objective- To write a program that will predict the future.docx por
in c++ Your objective- To write a program that will predict the future.docxin c++ Your objective- To write a program that will predict the future.docx
in c++ Your objective- To write a program that will predict the future.docxmckerliejonelle
3 vistas2 diapositivas
Write a program which repeatedly reads numbers until the user enters.docx por
Write a program which repeatedly reads numbers until the user enters.docxWrite a program which repeatedly reads numbers until the user enters.docx
Write a program which repeatedly reads numbers until the user enters.docxMelvinaLeepercy
3 vistas2 diapositivas

Más contenido relacionado

Similar a i have 10 python programming questions half of the questions.docx

1.Write code that will ask the user to input a 4 digit code say .docx por
1.Write code that will ask the user to input a 4 digit code say .docx1.Write code that will ask the user to input a 4 digit code say .docx
1.Write code that will ask the user to input a 4 digit code say .docxelliotkimberlee
2 vistas3 diapositivas
COMP 122 Entire Course NEW por
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEWshyamuopeight
11 vistas33 diapositivas
Course project solutions 2018 por
Course project solutions 2018Course project solutions 2018
Course project solutions 2018Robert Geofroy
12 vistas29 diapositivas
Cpp Homework Help por
Cpp Homework Help Cpp Homework Help
Cpp Homework Help C++ Homework Help
45 vistas24 diapositivas
If switch structure por
If switch structureIf switch structure
If switch structureM Sagheer Malik
126 vistas3 diapositivas
Question 1- Divisible (5 points in total) Write a C program that promp.pdf por
Question 1- Divisible (5 points in total) Write a C program that promp.pdfQuestion 1- Divisible (5 points in total) Write a C program that promp.pdf
Question 1- Divisible (5 points in total) Write a C program that promp.pdfEvanOZpWallaceq
4 vistas1 diapositiva

Similar a i have 10 python programming questions half of the questions.docx(20)

1.Write code that will ask the user to input a 4 digit code say .docx por elliotkimberlee
1.Write code that will ask the user to input a 4 digit code say .docx1.Write code that will ask the user to input a 4 digit code say .docx
1.Write code that will ask the user to input a 4 digit code say .docx
elliotkimberlee2 vistas
COMP 122 Entire Course NEW por shyamuopeight
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
shyamuopeight11 vistas
Question 1- Divisible (5 points in total) Write a C program that promp.pdf por EvanOZpWallaceq
Question 1- Divisible (5 points in total) Write a C program that promp.pdfQuestion 1- Divisible (5 points in total) Write a C program that promp.pdf
Question 1- Divisible (5 points in total) Write a C program that promp.pdf
EvanOZpWallaceq4 vistas
Student Lab Activity CIS170C Week 6 Lab InstructionsLa.docx por florriezhamphrey3065
Student Lab Activity CIS170C Week 6 Lab InstructionsLa.docxStudent Lab Activity CIS170C Week 6 Lab InstructionsLa.docx
Student Lab Activity CIS170C Week 6 Lab InstructionsLa.docx
Java Practice Set por Gaurav Dixit
Java Practice SetJava Practice Set
Java Practice Set
Gaurav Dixit1.1K vistas
For this and all programming assignments for this course, you are to.docx por denneymargareta
For this and all programming assignments for this course, you are to.docxFor this and all programming assignments for this course, you are to.docx
For this and all programming assignments for this course, you are to.docx
denneymargareta2 vistas
Oop lab assignment 01 por Drjilesh
Oop lab assignment 01Oop lab assignment 01
Oop lab assignment 01
Drjilesh41 vistas
Wellness for LifeName ______________10 Station Workout Plan (.docx por alanfhall8953
Wellness for LifeName ______________10 Station Workout Plan (.docxWellness for LifeName ______________10 Station Workout Plan (.docx
Wellness for LifeName ______________10 Station Workout Plan (.docx
alanfhall89534 vistas
Little book of programming challenges por ysolanki78
Little book of programming challengesLittle book of programming challenges
Little book of programming challenges
ysolanki781.1K vistas
Errors occur in programs, and there are two ways to address the pr.docx por YASHU40
Errors occur in programs, and there are two ways to address the pr.docxErrors occur in programs, and there are two ways to address the pr.docx
Errors occur in programs, and there are two ways to address the pr.docx
YASHU402 vistas
Lab-11-C-Problems.pptx por ShimoFcis
Lab-11-C-Problems.pptxLab-11-C-Problems.pptx
Lab-11-C-Problems.pptx
ShimoFcis6 vistas
Fundamental Concepts of Computing and Programming in Civil and Env por DustiBuckner14
Fundamental Concepts of Computing and Programming in Civil and EnvFundamental Concepts of Computing and Programming in Civil and Env
Fundamental Concepts of Computing and Programming in Civil and Env
DustiBuckner142 vistas
MUST BE IN JAVA PROGRAM PLEASE! Write a Java program that displays a m.docx por LucasmHKChapmant
MUST BE IN JAVA PROGRAM PLEASE! Write a Java program that displays a m.docxMUST BE IN JAVA PROGRAM PLEASE! Write a Java program that displays a m.docx
MUST BE IN JAVA PROGRAM PLEASE! Write a Java program that displays a m.docx
LucasmHKChapmant2 vistas
Chapter 3 branching v4 por Sunarto Quek
Chapter 3 branching v4Chapter 3 branching v4
Chapter 3 branching v4
Sunarto Quek77 vistas
Comp 122 lab 4 lab report and source code por pradesigali1
Comp 122 lab 4 lab report and source codeComp 122 lab 4 lab report and source code
Comp 122 lab 4 lab report and source code
pradesigali173 vistas
Devry cis-170-c-i lab-4-of-7-functions por noahjamessss
Devry cis-170-c-i lab-4-of-7-functionsDevry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functions
noahjamessss9 vistas

Más de 4934bk

You are the information technology manager of an.docx por
You are the information technology manager of an.docxYou are the information technology manager of an.docx
You are the information technology manager of an.docx4934bk
6 vistas2 diapositivas
Write an essay using one of the poems in the.docx por
Write an essay using one of the poems in the.docxWrite an essay using one of the poems in the.docx
Write an essay using one of the poems in the.docx4934bk
4 vistas1 diapositiva
Writing in the social sciences.docx por
Writing in the social sciences.docxWriting in the social sciences.docx
Writing in the social sciences.docx4934bk
2 vistas1 diapositiva
Writing and and Neurology Departments By.docx por
Writing and and Neurology Departments By.docxWriting and and Neurology Departments By.docx
Writing and and Neurology Departments By.docx4934bk
3 vistas2 diapositivas
Writing Premium Paper Help.docx por
Writing Premium Paper Help.docxWriting Premium Paper Help.docx
Writing Premium Paper Help.docx4934bk
3 vistas1 diapositiva
You will be required to interview a business manager of.docx por
You will be required to interview a business manager of.docxYou will be required to interview a business manager of.docx
You will be required to interview a business manager of.docx4934bk
4 vistas1 diapositiva

Más de 4934bk(20)

You are the information technology manager of an.docx por 4934bk
You are the information technology manager of an.docxYou are the information technology manager of an.docx
You are the information technology manager of an.docx
4934bk6 vistas
Write an essay using one of the poems in the.docx por 4934bk
Write an essay using one of the poems in the.docxWrite an essay using one of the poems in the.docx
Write an essay using one of the poems in the.docx
4934bk4 vistas
Writing in the social sciences.docx por 4934bk
Writing in the social sciences.docxWriting in the social sciences.docx
Writing in the social sciences.docx
4934bk2 vistas
Writing and and Neurology Departments By.docx por 4934bk
Writing and and Neurology Departments By.docxWriting and and Neurology Departments By.docx
Writing and and Neurology Departments By.docx
4934bk3 vistas
Writing Premium Paper Help.docx por 4934bk
Writing Premium Paper Help.docxWriting Premium Paper Help.docx
Writing Premium Paper Help.docx
4934bk3 vistas
You will be required to interview a business manager of.docx por 4934bk
You will be required to interview a business manager of.docxYou will be required to interview a business manager of.docx
You will be required to interview a business manager of.docx
4934bk4 vistas
Your literature review should use all the articles from your.docx por 4934bk
Your literature review should use all the articles from your.docxYour literature review should use all the articles from your.docx
Your literature review should use all the articles from your.docx
4934bk7 vistas
You will continue to work on the SWOT analysis or.docx por 4934bk
You will continue to work on the SWOT analysis or.docxYou will continue to work on the SWOT analysis or.docx
You will continue to work on the SWOT analysis or.docx
4934bk3 vistas
Your final healthcare marketing and communication plan has been.docx por 4934bk
Your final healthcare marketing and communication plan has been.docxYour final healthcare marketing and communication plan has been.docx
Your final healthcare marketing and communication plan has been.docx
4934bk5 vistas
to questions.docx por 4934bk
to questions.docxto questions.docx
to questions.docx
4934bk2 vistas
You are a family nurse practitioner working in an outpatient.docx por 4934bk
You are a family nurse practitioner working in an outpatient.docxYou are a family nurse practitioner working in an outpatient.docx
You are a family nurse practitioner working in an outpatient.docx
4934bk3 vistas
You will first choose a behavioral scenario than the.docx por 4934bk
You will first choose a behavioral scenario than the.docxYou will first choose a behavioral scenario than the.docx
You will first choose a behavioral scenario than the.docx
4934bk3 vistas
You have an interview for a job as a paid.docx por 4934bk
You have an interview for a job as a paid.docxYou have an interview for a job as a paid.docx
You have an interview for a job as a paid.docx
4934bk3 vistas
Writing based on a newspaper article your choice such as.docx por 4934bk
Writing based on a newspaper article your choice such as.docxWriting based on a newspaper article your choice such as.docx
Writing based on a newspaper article your choice such as.docx
4934bk8 vistas
X have a positive or a negative impact on.docx por 4934bk
X have a positive or a negative impact on.docxX have a positive or a negative impact on.docx
X have a positive or a negative impact on.docx
4934bk2 vistas
Write an essay on the colonial.docx por 4934bk
Write an essay on the colonial.docxWrite an essay on the colonial.docx
Write an essay on the colonial.docx
4934bk3 vistas
Write about Theoretical Framework by providing guidelines and basic.docx por 4934bk
Write about Theoretical Framework by providing guidelines and basic.docxWrite about Theoretical Framework by providing guidelines and basic.docx
Write about Theoretical Framework by providing guidelines and basic.docx
4934bk3 vistas
Write about Mission Command.docx por 4934bk
Write about Mission Command.docxWrite about Mission Command.docx
Write about Mission Command.docx
4934bk3 vistas
Write about the GFOA rating category Operations.docx por 4934bk
Write about the GFOA rating category Operations.docxWrite about the GFOA rating category Operations.docx
Write about the GFOA rating category Operations.docx
4934bk2 vistas
Write about Korean drama especially the.docx por 4934bk
Write about Korean drama especially the.docxWrite about Korean drama especially the.docx
Write about Korean drama especially the.docx
4934bk3 vistas

Último

STRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdf por
STRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdfSTRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdf
STRATEGIC MANAGEMENT MODULE 1_UNIT1 _UNIT2.pdfDr Vijay Vishwakarma
134 vistas68 diapositivas
Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a Choice por
Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a ChoiceCreative Restart 2023: Atila Martins - Craft: A Necessity, Not a Choice
Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a ChoiceTaste
52 vistas50 diapositivas
Interaction of microorganisms with vascular plants.pptx por
Interaction of microorganisms with vascular plants.pptxInteraction of microorganisms with vascular plants.pptx
Interaction of microorganisms with vascular plants.pptxMicrobiologyMicro
58 vistas33 diapositivas
11.30.23A Poverty and Inequality in America.pptx por
11.30.23A Poverty and Inequality in America.pptx11.30.23A Poverty and Inequality in America.pptx
11.30.23A Poverty and Inequality in America.pptxmary850239
181 vistas18 diapositivas
Java Simplified: Understanding Programming Basics por
Java Simplified: Understanding Programming BasicsJava Simplified: Understanding Programming Basics
Java Simplified: Understanding Programming BasicsAkshaj Vadakkath Joshy
663 vistas155 diapositivas
Introduction to AERO Supply Chain - #BEAERO Trainning program por
Introduction to AERO Supply Chain  - #BEAERO Trainning programIntroduction to AERO Supply Chain  - #BEAERO Trainning program
Introduction to AERO Supply Chain - #BEAERO Trainning programGuennoun Wajih
123 vistas78 diapositivas

Último(20)

Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a Choice por Taste
Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a ChoiceCreative Restart 2023: Atila Martins - Craft: A Necessity, Not a Choice
Creative Restart 2023: Atila Martins - Craft: A Necessity, Not a Choice
Taste52 vistas
Interaction of microorganisms with vascular plants.pptx por MicrobiologyMicro
Interaction of microorganisms with vascular plants.pptxInteraction of microorganisms with vascular plants.pptx
Interaction of microorganisms with vascular plants.pptx
MicrobiologyMicro58 vistas
11.30.23A Poverty and Inequality in America.pptx por mary850239
11.30.23A Poverty and Inequality in America.pptx11.30.23A Poverty and Inequality in America.pptx
11.30.23A Poverty and Inequality in America.pptx
mary850239181 vistas
Introduction to AERO Supply Chain - #BEAERO Trainning program por Guennoun Wajih
Introduction to AERO Supply Chain  - #BEAERO Trainning programIntroduction to AERO Supply Chain  - #BEAERO Trainning program
Introduction to AERO Supply Chain - #BEAERO Trainning program
Guennoun Wajih123 vistas
UNIT NO 13 ORGANISMS AND POPULATION.pptx por Madhuri Bhande
UNIT NO 13 ORGANISMS AND POPULATION.pptxUNIT NO 13 ORGANISMS AND POPULATION.pptx
UNIT NO 13 ORGANISMS AND POPULATION.pptx
Madhuri Bhande43 vistas
JRN 362 - Lecture Twenty-Two por Rich Hanley
JRN 362 - Lecture Twenty-TwoJRN 362 - Lecture Twenty-Two
JRN 362 - Lecture Twenty-Two
Rich Hanley39 vistas
Six Sigma Concept by Sahil Srivastava.pptx por Sahil Srivastava
Six Sigma Concept by Sahil Srivastava.pptxSix Sigma Concept by Sahil Srivastava.pptx
Six Sigma Concept by Sahil Srivastava.pptx
Sahil Srivastava51 vistas

i have 10 python programming questions half of the questions.docx

  • 1. i have 10 python programming questions half of the questions and half of the programming part i have attached the questions file please go through it TASK TWO: OPERATORS AND DECISION MAKING STATEMENT1.Write a program in Python to perform the following operation:If a number is divisible by 3 it should print “Consultadd” as a stringIf a number is divisible by 5 it should print “c” as a stringIf a number is divisible by both 3 and 5 it should print “Consultadd Python Training― as a string.2. Write a program in Python to perform the following operator based task:Ask user to choose the following option first:If User Enter 1 – AdditionIf User Enter 2 – SubtractionIf User Enter 3 – DivisionIf USer Enter 4 – MultiplicationIf User Enter 5 – AverageAsk user to enter the 2 numbers in a variable for first and second for the first 4 options mentioned above.Ask user to enter two more numbers as first1 and second2 for calculating the average as soon as user choose an option 5.At the end if the answer of any operation is Negative print a statement saying “zsa―NOTE: At a time user can perform one action at a time.3. Write a program in Python to implement the given flowchart:4. Write a program in Python to break and continue if the following cases occurs:If user enters a negative number just break the loop and print “It’s Over―If user enters a positive number just continue in the loop and print “Good Going―5. Write a program in Python which will find all such numbers which are divisible by 7 but are not a multiple of 5, between 2000 and 3200.6. What is the output of the following code examples?x=123for i in x:print(i)i = 0while i < 5:print(i)i += 1if i == 3:breakelse:print(“error―)count = 0while True:print(count)count += 1if count >= 5:Break7. Write a program that prints all the numbers from 0 to 6 except 3 and 6.Expected output: 0 1 2 4 5Note: Use ‘continue’ statement8. Write a program that accepts a string as an input from user and calculate the number of digits and letters.Expected output: consul12Letters 6Digits 29. Read the two parts of the question below:Write a program such that it asks users to “guess the lucky number―. If the correct number is guessed the program stops, otherwise it continues forever.Modify the program so that it asks users whether they want to guess again each time. Use two variables, ‘number’ for the number and ‘answer’ for the answer to the question whether they want to continue guessing. The program stops if the user guesses the correct number or answers “no―. ( The program continues as long as a user has not answered “no― and has not guessed the correct number)10. Write a program that asks five times to guess the lucky
  • 2. number. Use a while loop and a counter, such ascounter=1While counter <= 5:print(“Type in the”, counter, “number”counter=counter+1The program asks for five guesses (no matter whether the correct number was guessed or not). If the correct number is guessed, the program outputs “Good guess!―, otherwise it outputs “Try again!”. After the fifth guess it stops and prints “Game over!”.11. In the previous question, insert “break” after the “Good guess!” print statement. “break― will terminate the while loop so that users do not have to continue guessing after they found the number. If the user does not guess the number at all, print “Sorry but that was not very successful―.