Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q2. Define a function to print multiple elements by passing only a single actual/informal argument containing all the elements. Q3. Write a function to display

image text in transcribed

Q2. Define a function to print multiple elements by passing only a single actual/informal argument containing all the elements. Q3. Write a function to display sum of odd and even nos upto a given no. using recursion. Q4. Write a function to display whether the inputted no. is a prime no. or not. Q5.Define a function using recursion to print factorial of a given no. Q6.Define a function to copy the data of a file into another file called "welcome.txt". Q7. Create a file consisting of 10 lines of text and print its 5th line, 6th line, total no. of lines, words and spaces. Also print the words which start with alphabet s or e" using regular expressions. Q8.Write a program to insert a text in the 3rd line of a file containing 7 lines. Q9. Ram is planning to give chocolates to two of his brother. He comes to a shop that has 'n' chocolates of type 1 and 'm' chocolates of type 2, and Ram wants to buy largest but equal no. of both. Write a program to determine the no. using recursive function. Q10.Write a program check if a file is closed or not and also print the name and access mode of the file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

Define Administration and Management

Answered: 1 week ago