logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Elijah YoungManagement
(5/5)

780 Answers

Hire Me
expert
Stevan DuignannNursing
(5/5)

713 Answers

Hire Me
expert
Manning DaleResume writing
(5/5)

707 Answers

Hire Me
expert
Sina AntiqueePsychology
(5/5)

851 Answers

Hire Me
Others
(5/5)

Write a simple user defined function that greets a person in such a way that

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

MODULE 5 LOOPS and Functions

Please implement Python coding for all the problems.

 

1. A) list1=[1,5.5,(10+20j),’data science’].. Print default functions and parameters exists in list1.

B) How do we create a sequence of numbers in Python.

C)  Read the input from keyboard and print a sequence of numbers up to that number

 

2. Create 2 lists.. one list contains 10 numbers (list1=[0,1,2,3....9]) and other 

list contains words of those 10 numbers (list2=['zero','one','two',.... ,'nine']).

 Create a dictionary such that list2 are keys and list 1 are values..

 

3. Consider a list1 [3,4,5,6,7,8]. Create a new list2 such that Add 10 to the even number and multiply with 5 if it is odd number in the list1..

 

       4.     Write a simple user defined function that greets a person in such a way that :

             i) It should accept both name of person and message you want to deliver.

              ii) If no message is provided, it should greet a default message ‘How are you’

           Ex: Hello ---xxxx---, How are you  - default message.

            Ex: Hello ---xxxx---, --xx your message xx---

 

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme