Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Lucky number program in python

27/11/2021 Client: muhammad11 Deadline: 2 Day

Python Programming

TASK TWO: OPERATORS AND DECISION MAKING STATEMENT

1. Write a program in Python to perform the following operation:

· If a number is divisible by 3 it should print “Consultadd” as a string

· If a number is divisible by 5 it should print “c” as a string

· If 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 - Addition

· If User Enter 2 - Subtraction

· If User Enter 3 - Division

· If USer Enter 4 - Multiplication

· If User Enter 5 - Average

· Ask 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=123

for i in x:

print(i)

· i = 0

while i < 5:

print(i)

i += 1

if i == 3:

break

else:

print(“error”)

· count = 0

while True:

print(count)

count += 1

if count >= 5:

Break

7. Write a program that prints all the numbers from 0 to 6 except 3 and 6.

Expected output: 0 1 2 4 5

Note: Use ‘continue’ statement

8. Write a program that accepts a string as an input from user and calculate the number of digits and letters.

Expected output: consul12

Letters 6

Digits 2

9. 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 as

counter=1

While counter <= 5:

print(“Type in the”, counter, “number”

counter=counter+1

The 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”.

TASK THREE: DATA STRUCTURES

1. Create a list of the 10 elements of four different types of Data Type like int, string, complex and float.

2. Create a list of size 5 and execute the slicing structure

3. Write a program to get the sum and multiply of all the items in a given list.

4. Find the largest and smallest number from a given list.

5. Create a new list which contains the specified numbers after removing the even numbers from a predefined list.

6. Create a list of first and last 5 elements where the values are square of numbers between 1 and 30 (both included).

7. Write a program to replace the last element in a list with another list.

Sample data: [[1,3,5,7,9,10],[2,4,6,8]]

Expected output: [1,3,5,7,9,2,4,6,8]

8. Create a new dictionary by concatenating the following two dictionaries:

a={1:10,2:20}

b={3:30,4:40}

Expected Result: {1:10,2:20,3:30,4:40}

9. Create a dictionary that contains a number (between 1 and n) in the form(x,x*x).

Sample data (n=5)

Expected Output: {1:1,2:4,3:9,4:16,5:25}

10. Write a program which accepts a sequence of comma-separated numbers from console and generate a list and a tuple which contains every number. Suppose the following input is supplied to the program:

34,67,55,33,12,98

The output should be:

[‘34’,’67’,’55’,’33’,’12’,’98’]

(‘34’,’67’,’55’,’33’,’12’,’98’)

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

WRITING LAND
Quick Mentor
Homework Guru
Instant Assignments
Coursework Help Online
Financial Solutions Provider
Writer Writer Name Offer Chat
WRITING LAND

ONLINE

WRITING LAND

I have read your project description carefully and you will get plagiarism free writing according to your requirements. Thank You

$34 Chat With Writer
Quick Mentor

ONLINE

Quick Mentor

This project is my strength and I can fulfill your requirements properly within your given deadline. I always give plagiarism-free work to my clients at very competitive prices.

$23 Chat With Writer
Homework Guru

ONLINE

Homework Guru

I am a professional and experienced writer and I have written research reports, proposals, essays, thesis and dissertations on a variety of topics.

$47 Chat With Writer
Instant Assignments

ONLINE

Instant Assignments

I have read your project details and I can provide you QUALITY WORK within your given timeline and budget.

$37 Chat With Writer
Coursework Help Online

ONLINE

Coursework Help Online

As per my knowledge I can assist you in writing a perfect Planning, Marketing Research, Business Pitches, Business Proposals, Business Feasibility Reports and Content within your given deadline and budget.

$39 Chat With Writer
Financial Solutions Provider

ONLINE

Financial Solutions Provider

I am a PhD writer with 10 years of experience. I will be delivering high-quality, plagiarism-free work to you in the minimum amount of time. Waiting for your message.

$35 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

LITERATURE - Follow the Assignment instructions - What is a run chart in healthcare - reflect on the web article Big Data Means Big Potential, Challenges for Nurse Execs. Reflect on your own experience with complex health information access and management and consider potential challenges and risks  - Curley's wife personality traits - Ethics in financial responsibilities and to evaluate ethical considerations of executive compensation - Rudolf dreikurs theory child development - Health Assessment Check-Off Project Problem Focus Exams: Musculoskeletal and Extremities - What role does creativity play in the bat poet - Civil 3d storm and sanitary analysis - North lake senior campus - Difference between plant and animal cells chart - Activity 13.3 nisqually glacier response to climate change answers - Hsa ergonomics workshop - Can a society based on hate survive 1984 essay - 978 1 259 73278 2 - Chemical reaction between khp and naoh - Kriss kross puzzle maker - Journal Article Critique - The outsiders chapter 11 12 questions and answers - INR Initial Response Vietnam/ UN Security Council simulation. - Facebook inc the initial public offering case study solution - How to create a hangman game in powerpoint - Interpreted vs compiled speed - Latvian song and dance festival 2013 - Secure greenpeace co uk plastics calculator - Deliverable 2 - Tutoring on the Normal Distribution - Coastal management newspaper articles - Bibliography - Sew what inc case study answers - Dulux all metal primer - Inverse square law graph - Twinkle of a fading star - Sophia lucia good ship lollipop - Booster ks2 coordinates 4 5 - Gcu learn - Topographic map practice worksheet - World Perspective Week 4 - Mba bath business school - 4 5 mastery problem accounting - Health promotion model manual - Module 08 Pre-Lab Assignment - The habitable planet ecology lab answers - Hot bolting safety precautions - Waterbury insurance company wants study - Application of operant conditioning - Protein synthesis & amino acid worksheet - Blue cloud gets agile case study - Please define each word using the back of your textbook and find/draw a picture to represent each word. You may use the vocabulary template (located in the lesson resources tab), notebook paper, Sway, PowerPoint, or Excel. - Download the file below - Cfmeu site allowance rates - Action research project proposal - Character description year 1 - How to cite sentinel city in apa format - U store it tonsley - Killing us softly 4 free online - How does teamwork influence innovation at ideo - 4 month old well child soap note - Outback steakhouse international strategy - Acounting assignment#2 - Critical thinking 12th edition moore pdf - 1800 mm in cm - Coding practicum outpatient book evaluation and management - Journal 1 - Cybersecurity Program - SOCW 6361 - English Comp 2 - The leadership challenge 5th edition chapter summary - Defence approved software list dasl - What are the four components of the nqf - Mental sets in psychology - 6.9 1.6 worksheet answer broadband questions answers - Timed Quiz - The psychoanalytic theory of personality was developed by - Write a select statement that returns these columns from the invoices table - Edu 671 fundamentals of educational research - Online class - Understanding business research terms and concepts part 2 - What type of test has the supreme court relied upon in order to distinguish stops from nonstops? - Net zero energy building thesis - Matthew 5 43 48 relevance to other worldviews - Mtv global expansion - Adjusted cash balance per books - Purchase order management process flow chart - Home 8th Grade Physical Science Semester 1 Virtual Learning - 9 - Mkt 571 price and channel strategy - Week 1 - Selection pressure peppered moths - Brightgreen d900 shx curve - Mindtap french answers - To Accept or Reject a Client - Southworth company uses a job order costing system - Nathan harmon motivational speaker - Anton paar mcr 702 - Cold contact cover letter template - Jeff nippard book review - Advance business stat - 1994 nobel peace prize sharer crossword clue - Royal academy of engineering code of ethics - American Literature