task 1;- #include <iostream> using namespace std; int main() { int age; cout<< " ENTER YOUR AGE "; cin >> age; switch (age) { case 19: cout << "your are welcome"; break; case 100: cout << "get out "; break; default: cout << "go to hell"; break; } } task 2 :- //2D array #include <iostream> using namespace std; int main() { int marks[2][2] = { {3,4},{4,5} }; for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { cout <<"\t" << marks[i][j]; } } } TASK 3 :_ was about break and continue TASK 4 :_ #include <iostream> #include <string> using namespace st...
Posts
Showing posts from June, 2021
my django chars count project
- Get link
- X
- Other Apps
from django.http import HttpResponse from django.shortcuts import render def index ( request ) : return render ( request , 'index2.html' ) def analyze ( request ) : #Get the text djtext = request .GET. get ( 'text' , 'default' ) # Check checkbox values removepunc = request .GET. get ( 'removepunc' , 'off' ) char_c = request .GET. get ( 'char_count' , 'off' ) #Check which checkbox is on if removepunc == "on" : punctuations = '''!()-[]{};:'"\,<>./?@#$%^&*_~''' analyzed = "" for char in djtext : if char not in punctuations : analyzed = analyzed + char params = { 'purpose' : 'Removed Punctuations' , 'analyzed_text' : analyzed} return render ( request , 'index.html' , params) elif (char_c == 'on' ) : analyzed = '' ...