From d1f43769b8a876291b29584931457412820c4c00 Mon Sep 17 00:00:00 2001 From: Jack <71869949+Mr-Jack2@users.noreply.github.com> Date: Sun, 4 Oct 2020 23:09:01 +0530 Subject: [PATCH 1/3] Create Recursion --- Recursion | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Recursion diff --git a/Recursion b/Recursion new file mode 100644 index 0000000..ba68ac4 --- /dev/null +++ b/Recursion @@ -0,0 +1,21 @@ +#include +using namespace std; +//Factorial function +int f(int n){ + /* This is called the base condition, it is + * very important to specify the base condition + * in recursion, otherwise your program will throw + * stack overflow error. + */ + if (n <= 1) + return 1; + else + return n*f(n-1); +} +int main(){ + int num; + cout<<"Enter a number: "; + cin>>num; + cout<<"Factorial of entered number: "< Date: Thu, 8 Oct 2020 19:33:24 +0530 Subject: [PATCH 2/3] Create TCS_Digital pipequestion.cpp --- TCS_Digital pipequestion.cpp | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 TCS_Digital pipequestion.cpp diff --git a/TCS_Digital pipequestion.cpp b/TCS_Digital pipequestion.cpp new file mode 100644 index 0000000..a2dfc94 --- /dev/null +++ b/TCS_Digital pipequestion.cpp @@ -0,0 +1,37 @@ +#include +using namespace std; + int main() +{ + int N,M,R, incoming[1000],outgoing[1000],actin[1000],acout[1000]; + int totin, totout; + + cin>>N>>M>>R; + + for(int i=0; i>incoming[i]; + actin[i]= incoming[i]-R; + + for(int i=0; i>outgoing[i]; + acout[i]= outgoing[i]-R; + } + totin = 0; + totout=0; + for (int i=0;i Date: Thu, 8 Oct 2020 20:21:08 +0530 Subject: [PATCH 3/3] Create Text_to_speech.py --- Text_to_speech.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Text_to_speech.py diff --git a/Text_to_speech.py b/Text_to_speech.py new file mode 100644 index 0000000..4058f48 --- /dev/null +++ b/Text_to_speech.py @@ -0,0 +1,19 @@ +#first install gtts package on cmd --> pip install gtts +from gtts import gTTS +#import gTTS from package install +import os #neeed to learn more ... +#inbuild package + +#mytext= "Text to speech conversion using python" #we can gave text here too or +#to read the file make file handler +#default method in python which is used to open file open(,"r") and read(mode),it can be write too +fh=open("text.txt","r") +mytext=fh.read().replace("\n"," ") #here i too replace all the line ending with " " + +language="en"#variable called language t lang we us fr-->french,en-->english which is supported by gTTS + +output=gTTS(text=mytext,lang=language,slow=False) #slow makes False so our audio play in fast speed not in slow speed + +output.save("output.mp3") #u can saved ur output in mp3 by calling method call save +fh.close() +os.system("start output.mp3") #for playing audio file