Skip to content
- Courses
- DSA to Development
- Newly Launched!
- For Working Professionals
- For Students
- GATE Exam Courses
- All Courses
- Tutorials
- Data Structures & Algorithms
- DSA for Beginners
- Data Structures
- Algorithms
- Complete DSA Tutorial
- Competitive Programming
- Company Wise SDE Sheets
- DSA Cheat Sheets
- Top 100 DSA Interview Questions Topic-wise
- 100 Days of Code
- Python
- ML & Data Science
- Machine Learning
- Data Science Tutorial
- Data Science Packages
- Data Visualization
- Data Analysis
- Deep Learning
- NLP Tutorial
- OpenCV Tutorial
- Interview Questions
- System Design
- Interview Corner
- Languages
- Web Development
- HTML
- CSS
- JavaScript
- TypeScript
- ReactJS
- Node.js
- PHP
- AngularJS
- jQuery
- Web Development Using Python
- Web Design
- 100 Days of Web Development
- CS Subjects
- DevOps And Linux
- School Learning
- GATE
- GeeksforGeeks Videos
- Data Structures & Algorithms
- Jobs
- Practice
- All DSA Problems
- Problem of the Day
- Company Wise Coding Practice
- GfG SDE Sheet
- Practice Problems Difficulty Wise
- Language Wise Coding Practice
- Curated DSA Lists
- Contests
-
Last Updated : 29 Jun, 2022
Summarize
Comments
Improve
In the following article, we will compare the 3 most used coding languages from a beginner’s perspective. It will help you to learn basics of all the 3 languages together while saving your time and will also help you to inter shift from one language you know to the other which you don’t. Let’s discuss a brief history of all the 3 languages and then we will move on to the practical learning.
C Vs C++ Vs Python
C C++ Python C was developed by Dennis Ritchie between the year 1969 and 1973 at AT&T Bell Labs. C++ was developed by Bjarne Stroustrup in 1979. Python was created by Guido van Rossum, and released in 1991. More difficult to write code in contrast to both Python and C++ due to complex syntax. C++ code is less complex than C but more complex in contrast to python. Easier to write code. Longer lines of code as compared to python. Longer lines of code as compared to python. 3-5 times shorter than equivalent C/C++ programs. Variables are declared in C. Variables are declared in C++ Python has no declaration. C is a compiled language. C++ is a compiled language. Python is an interpreted language. C contains 32 keywords. C++ contains 52 keywords. Python contains 33 keywords. For the development of code, C supports procedural programming. C++ is known as hybrid language because C++ supports both procedural and object oriented programming paradigms. Python supports multiple programming paradigms, including procedural, object-oriented, and functional programming. C does not support inheritance. C++ support both single and multiple inheritance Python supports all 5 types of inheritance i.e. single inheritance, multiple inheritance, multilevel inheritance, hierarchical inheritance, and hybrid inheritance C provides malloc() and calloc() functions for dynamic memory allocation, and free() for memory de-allocation. C++ provides new operator for memory allocation and delete operator for memory de-allocation. Python’s memory allocation and deallocation method is automatic. Direct support for exception handling is not supported by C. Exception handling is supported by C++. Exception handling is supported by Python. Library and Header files inclusion
Header Files: The files that tell the compiler how to call some functionality (without knowing how the functionality actually works) are called header files. They contain the function prototypes. They also contain Data types and constants used with the libraries. We use #include to use these header files in programs. These files end with .h extension.
Library: Library is the place where the actual functionality is implemented i.e. they contain function body.
Modules: A module is a file containing Python definitions and statements. A module can define functions, classes, and variables. A module can also include runnable code. Grouping related code into a module makes the code easier to understand and use. Import in python is similar to #include header_file in C/C++. Python modules can get access to code from another module by importing the file/function using import.C
// C program to demonstrate
// adding header file
#include <stdio.h>
#include <string.h>
C++
// C++ program to demonstrate
// adding header file
#include <iostream>
using
namespace
std;
#include <math.h>
Python
# Python program to demonstrate
# including modules
import
tensorflow
# Including a class
# from existing module
from
tensorflow
import
keras
Main method declaration
Main method declaration is declaring to computer that from here the implementation of my code should be done. The process of declaring main is same in C and C++. As we declare int main where int stands for return type we should have to return something integral at the end of code so that it compiles without error. We can write our code in between the curly braces.
C
// C program to demonstrate
// declaring main
#include <stdio.h>
int
main()
{
// Your code here
return
0;
}
C++
// C++ program to demonstrate
// declaring main
#include <iostream>
int
main()
{
// Your code here
return
0;
}
It is not necessary to declare main in python code unless and until you are declaring another function in your code. So we can declare main in python as follows.
Python3
# Python program to demonstrate
# declaring main
def
main():
# write your code here
if
__name__
=
=
"__main__"
:
main()
Declaring Variables
In C and C++ we first declare the data type of the variable and then declare the name of Variables. A few examples of data types are int, char, float, double, etc.
Python is not “statically typed”. We do not need to declare variables before using them or declare their type. A variable is created the moment we first assign a value to it.C
// C program to demonstrate
// declaring variable
#include <stdio.h>
int
main()
{
// Declaring one variable at a time
int
a;
// Declaring more than one variable
char
a, b, c, d;
// Initializing variables
float
a = 0, b, c;
b = 1;
return
0;
}
C++
// C++ program to demonstrate
// declaring variables
#include <iostream.h>
int
main()
{
// Declaring one variable at a time
int
a;
// Declaring more than one variable
char
a, b, c, d;
// Initializing variables
float
a = 0, b, c;
b = 1;
return
0;
}
Python
# Python program to demonstrate
# creating variables
# An integer assignment
age
=
45
# A floating point
salary
=
1456.8
# A string
name
=
"John"
Printing to console
The Syntax for printing something as output is different for all the 3 languages.
C
// C program to showing
// how to print data
// on screen
#include <stdio.h>
int
main()
{
printf
(
"Hello World"
);
return
0;
}
C++
// C++ program to showing
// how to print data
// on screen
#include <iostream>
using
namespace
std;
int
main()
{
cout <<
"Hello World"
;
return
0;
}
Python
# Python program to showing
# how to print data
# on screen
print
(
"Hello World"
)
Taking Input
The Syntax for taking input from the user is different in all three languages, so let’s see the syntax and write your first basic code in all the 3 languages.
C
// C program showing
// how to take input
// from user
#include <stdio.h>
int
main()
{
int
a, b, c;
printf
(
"first number: "
);
scanf
(
"%d"
, &a);
printf
(
"second number: "
);
scanf
(
"%d"
, &b);
c = a + b;
printf
(
"Hello World\n%d + %d = %d"
, a, b, c);
return
0;
}
C++
// C++ program showing
// how to take input
// from user
#include <iostream>
using
namespace
std;
int
main()
{
int
a, b, c;
cout <<
"first number: "
;
cin >> a;
cout << endl;
cout <<
"second number: "
;
cin >> b;
cout << endl;
c = a + b;
cout <<
"Hello World"
<< endl;
cout << a <<
"+"
<< b <<
"="
<< c;
return
0;
}
Python
# Python program showing
# how to take input
# from user
a
=
input
(
"first number: "
)
b
=
input
(
"second number: "
)
c
=
a
+
b
print
(
"Hello World"
)
print
(a,
"+"
, b,
"="
, c)
Please Login to comment...
Similar Reads
Comparing and Managing Names Using name-tools module in Python
While working with documents, we can have problems in which we need to work with Names. This article discusses the name-tools library which can help to perform this task. It can be used to manage and compare names. It currently includes English and Western Style names. Installation: Use the below command to install the name-tools library: pip insta
2 min read
Comparing Old-Style and New-Style Classes in Python
In Python, the difference between old-style and new-style classes is based on the inheritance from the built-in object class. This distinction was introduced in Python 2.x and was fully adopted in Python 3.x, where all classes are new-style classes. In this article, we will see the difference between the old-style and new-style classes in Python. P
4 min read
Comparing dates in Python
Comparing dates is quite easy in Python. Dates can be easily compared using comparison operators (like <, >, <=, >=, != etc.). Let's see how to compare dates with the help of datetime module using Python. Code #1 : Basic C/C++ Code # Simple Python program to compare dates # importing datetime module import datetime # date in yyyy/mm/dd
4 min read
Argparse VS Docopt VS Click - Comparing Python Command-Line Parsing Libraries
Before knowing about the Python parsing libraries we must have prior knowledge about Command Line User Interface. A Command Line Interface (CLI) provides a user-friendly interface for the Command-line programs, which is most commonly favored by the developers or the programmers who prefer keyboard programming, instead of using the mouse. By buildin
4 min read
Comparing Timestamp in Python - Pandas
Pandas timestamp is equivalent to DateTime in Python. The timestamp is used for time series oriented data structures in pandas. Sometimes date and time is provided as a timestamp in pandas or is beneficial to be converted in timestamp. And, it is required to compare timestamps to know the latest entry, entries between two timestamps, the oldest ent
3 min read
Why does comparing strings using either '==' or 'is' sometimes produce a different result in Python?
Python offers many ways of checking relations between two objects. Unlike some high-level languages, such as C++, Java, etc., which strictly use conditional operators. The most popular operators for checking equivalence between two operands are the == operator and the is operator. But there exists a difference between the two operators. In this art
4 min read
Python Program For Comparing Two Strings Represented As Linked Lists
Given two strings, represented as linked lists (every character is a node in a linked list). Write a function compare() that works similar to strcmp(), i.e., it returns 0 if both strings are the same, 1 if the first linked list is lexicographically greater, and -1 if the second string is lexicographically greater.Examples: Input: list1 = g->e-
2 min read
Comparing yfinance vs yahoo_fin in Python
In the field of financial data analysis and automation, having quality information at the right time is very vital. Data scraping activity in Python generally depends on specific libraries to fetch information from web pages such as Yahoo Finance, out of which two packages are yfinance and yahoo_fin. Many of these libraries provide robust APIs to p
9 min read
Comparing Django Environ vs Python Dotenv
Two tools can be used for managing environment variables in Python projects, especially for web applications, they are Django-environ and python-dotenv. Django-environ is a more specialized tool designed explicitly for Django applications, providing a full solution for working with environment variables, settings, and configuration files. Python-do
8 min read
Comparing psycopg2 vs psycopg in Python
PostgreSQL is a powerful, open-source relational database management system known for its robustness, extensibility, and standards compliance. It supports a wide range of data types and complex queries, making it suitable for various applications, from small web applications to large enterprise systems. Comparing psycopg2 vs psycopg in PythonFeatur
8 min read
Comparing psycopg2-binary vs psycopg2 in Python
When working with PostgreSQL databases in Python, one of the most critical decisions is choosing the right library for database connectivity. psycopg2 is the go-to library for many developers due to its efficiency and extensive feature set. However, there's often confusion between psycopg2 and its sibling, psycopg2-binary. This article will demysti
7 min read
Comparing X^Y and Y^X for very large values of X and Y
Given two integer X and Y, the task is compare XY and YX for large values of X and Y.Examples: Input: X = 2, Y = 3 Output: 2^3 < 3^2 23 < 32Input: X = 4, Y = 5 Output: 4^5 > 5^4 Naive approach: A basic approach is to find the values XY and YX and compare them which can overflow as the values of X and Y can be largeBetter approach: Taking l
4 min read
Problem in comparing Floating point numbers and how to compare them correctly?
In this article, we will see what is the problem in comparing floating-point numbers and we will discuss the correct way to compare two floating-point numbers. What is the problem in comparing Floating-Point Numbers usually?Let us first compare two floating-point numbers with the help of relational operator (==).Example: Using "==" for comparison C
7 min read
Comparing and Filtering NumPy array
In this article, we are going to see how to perform a comparison and filtering of the NumPy array. Comparing NumPy Array: Let's see the comparison operators that will be used in comparing NumPy Arrays - Greater than (>) Or numpy.greater().Less Than (<) numpy.less().Equal(==) or numpy.equal()Not Equal(!=) or numpy.not_equal().Greater than and
4 min read
Comparing path() and url() (Deprecated) in Django for URL Routing
When building web applications with Django, URL routing is a fundamental concept that allows us to direct incoming HTTP requests to the appropriate view function or class. Django provides two primary functions for defining URL patterns: path() and re_path() (formerly url()). Although both are used for routing, they serve slightly different purposes
8 min read
Comparing Ruby with other programming languages
Ruby is an Object-Oriented language developed by Yukihiro Matsumoto in mid 1990’s in Japan. The Objective of its development was to make it act as a sensible buffer between human programmers and the underlying computing machinery. It is a pure object-oriented language and everything is an object on Ruby. Ruby is based on many other languages like P
4 min read
Data Ingestion via Excel: Comparing runtimes
Data ingestion is the process of obtaining and importing the data for the storage in the database. In this article, we explore different data ingestion techniques used to extract the data from the excel file in Python and compare their runtimes. Let's suppose the excel file looks like this - Using xlrd library Using xlrd module, one can retrieve in
2 min read
Comparing various online solvers in Scikit Learn
Scikit Learn is a popular Python library that provides a wide range of machine-learning algorithms and tools. One of the key features of Scikit Learn is the ability to solve optimization problems using various online solvers. In this article, we will compare some of the most commonly used online solvers in Scikit Learn. What is an Online Solver?An
4 min read
Comparing Jinja to Other Templating Engines
When it comes to web development, templating engines play a crucial role in separating the logic from the presentation layer of an application. They allow developers to create dynamic web pages by embedding placeholders for data that can be filled in later. Jinja is one such templating engine that is widely used in the Python web development ecosys
5 min read
C++ Program For Comparing Two Strings Represented As Linked Lists
Given two strings, represented as linked lists (every character is a node in a linked list). Write a function compare() that works similar to strcmp(), i.e., it returns 0 if both strings are the same, 1 if the first linked list is lexicographically greater, and -1 if the second string is lexicographically greater.Examples: Input: list1 = g->e-
2 min read
Comparing String objects using Relational Operators in C++
If strings are compared using relational operators then, their characters are compared lexicographically according to the current character traits, means it starts comparison character by character starting from the first character until the characters in both strings are equal or a NULL character is encountered. Parameters : Two Strings required t
2 min read
WordPress vs Drupal: Comparing Content Management Systems (CMS)
Having a website is no longer a luxury in today's time, it is a necessity. Whether you are a budding entrepreneur, an experienced professional, or someone who just wants to express your passion and love through the internet, you can use your website as an online store, portfolio, or platform. However, with the lack of expertise in coding, building
11 min read
Google Cloud vs IBM Cloud: Comparing Cloud Platforms
To be productive in today’s business world, you must have noticed that cloud computing has become the World Wide Web’s Holy Grail. This implies that choosing the right cloud provider is not a matter of preference but mandatory since you need operational agility as data surges. In this detailed examination, we focus on the two cloud industries; Goo
9 min read
Important differences between Python 2.x and Python 3.x with examples
In this article, we will see some important differences between Python 2.x and Python 3.x with the help of some examples. Differences between Python 2.x and Python 3.x Here, we will see the differences in the following libraries and modules: Division operatorprint functionUnicodexrangeError Handling_future_ modulePython Division operatorIf we are p
5 min read
Creating and updating PowerPoint Presentations in Python using python - pptx
python-pptx is library used to create/edit a PowerPoint (.pptx) files. This won't work on MS office 2003 and previous versions. We can add shapes, paragraphs, texts and slides and much more thing using this library. Installation: Open the command prompt on your system and write given below command: pip install python-pptx Let's see some of its usag
4 min read
Competitive Coding Setup for C++ and Python in VS Code using Python Script
Most of us struggle with using heavy software to run C++ and python code and things become more complicated when we have too many files in a folder. In this blog, we are going to create a python script with VS-code-editor that works out to do all your works. It creates the folder + numbers of files required by the user in that folder with proper ex
3 min read
Learn DSA with Python | Python Data Structures and Algorithms
This tutorial is a beginner-friendly guide for learning data structures and algorithms using Python. In this article, we will discuss the in-built data structures such as lists, tuples, dictionaries, etc, and some user-defined data structures such as linked lists, trees, graphs, etc, and traversal as well as searching and sorting algorithms with th
15+ min read
Setting up ROS with Python 3 and Python OpenCV
Setting up a Robot Operating System (ROS) with Python 3 and OpenCV can be a powerful combination for robotics development, enabling you to leverage ROS's robotics middleware with the flexibility and ease of Python programming language along with the computer vision capabilities provided by OpenCV. Here's a step-by-step guide to help you set up ROS
3 min read
Python | Merge Python key values to list
Sometimes, while working with Python, we might have a problem in which we need to get the values of dictionary from several dictionaries to be encapsulated into one dictionary. This type of problem can be common in domains in which we work with relational data like in web developments. Let's discuss certain ways in which this problem can be solved.
4 min read
Reading Python File-Like Objects from C | Python
Writing C extension code that consumes data from any Python file-like object (e.g., normal files, StringIO objects, etc.). read() method has to be repeatedly invoke to consume data on a file-like object and take steps to properly decode the resulting data. Given below is a C extension function that merely consumes all of the data on a file-like obj
3 min read
Article Tags :
Trending in News
- OpenAI o1 AI Model Launched: Explore o1-Preview, o1-Mini, Pricing & Comparison
- How to Merge Cells in Google Sheets: Step by Step Guide
- How to Lock Cells in Google Sheets : Step by Step Guide
- PS5 Pro Launched: Controller, Price, Specs & Features, How to Pre-Order, and More
- #geekstreak2024 – 21 Days POTD Challenge Powered By Deutsche Bank
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id, check: true }), success:function(result) { jQuery.ajax({ url: writeApiUrl + 'suggestions/auth/' + `${post_id}/`, type: "GET", dataType: 'json', xhrFields: { withCredentials: true }, success: function (result) { $('.spinner-loading-overlay:eq(0)').remove(); var commentArray = result; if(commentArray === null || commentArray.length === 0) { // when no reason is availaible then user will redirected directly make the improvment. // call to api create-improvement-post $('body').append('
'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id, }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.unlocked-status--improve-modal-content').css("display","none"); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { $('.spinner-loading-overlay:eq(0)').remove(); var result = e.responseJSON; if(result.detail.non_field_errors.length){ $('.improve-modal--improve-content .improve-modal--improve-content-modified').text(`${result.detail.non_field_errors}.`); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); $('.improvement-reason-modal').hide(); } }, }); return; } var improvement_reason_html = ""; for(var comment of commentArray) { // loop creating improvement reason list markup var comment_id = comment['id']; var comment_text = comment['suggestion']; improvement_reason_html += `
${comment_text}
`; } $('.improvement-reasons_wrapper').html(improvement_reason_html); $('.improvement-bottom-btn').html("Create Improvement"); $('.improve-modal--improvement').hide(); $('.improvement-reason-modal').show(); }, error: function(e){ $('.spinner-loading-overlay:eq(0)').remove(); // stop loader when ajax failed; }, }); }, error:function(e) { $('.spinner-loading-overlay:eq(0)').remove(); var result = e.responseJSON; if(result.detail.non_field_errors.length){ $('.improve-modal--improve-content .improve-modal--improve-content-modified').text(`${result.detail.non_field_errors}.`); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); $('.improvement-reason-modal').hide(); } }, }); } else { if(loginData && !loginData.isLoggedIn) { $('.improve-modal--overlay').hide(); if ($('.header-main__wrapper').find('.header-main__signup.login-modal-btn').length) { $('.header-main__wrapper').find('.header-main__signup.login-modal-btn').click(); } return; } } }); $('.left-arrow-icon_wrapper').on('click',function(){ if($('.improve-modal--suggestion').is(":visible")) $('.improve-modal--suggestion').hide(); else{ $('.improvement-reason-modal').hide(); } $('.improve-modal--improvement').show(); }); function loadScript(src, callback) { var script = document.createElement('script'); script.src = src; script.onload = callback; document.head.appendChild(script); } function suggestionCall() { var suggest_val = $.trim($("#suggestion-section-textarea").val()); var array_String= suggest_val.split(" ") var gCaptchaToken = $("#g-recaptcha-response-suggestion-form").val(); var error_msg = false; if(suggest_val != "" && array_String.length >=4){ if(suggest_val.length <= 2000){ var payload = { "gfg_post_id" : `${post_id}`, "suggestion" : `
${suggest_val}
`, } if(!loginData || !loginData.isLoggedIn) // User is not logged in payload["g-recaptcha-token"] = gCaptchaToken jQuery.ajax({ type:'post', url: "https://apiwrite.geeksforgeeks.org/suggestions/auth/create/", xhrFields: { withCredentials: true }, crossDomain: true, contentType:'application/json', data: JSON.stringify(payload), success:function(data) { jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-section-textarea').val(""); jQuery('.suggest-bottom-btn').css("display","none"); // Update the modal content const modalSection = document.querySelector('.suggestion-modal-section'); modalSection.innerHTML = `
Thank You!
Your suggestions are valuable to us.
You can now also contribute to the GeeksforGeeks community by creating improvement and help your fellow geeks.
`; }, error:function(data) { jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Something went wrong."); jQuery('#suggestion-modal-alert').show(); error_msg = true; } }); } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Minimum 5 Words and Maximum Character limit is 2000."); jQuery('#suggestion-modal-alert').show(); jQuery('#suggestion-section-textarea').focus(); error_msg = true; } } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Enter atleast four words !"); jQuery('#suggestion-modal-alert').show(); jQuery('#suggestion-section-textarea').focus(); error_msg = true; } if(error_msg){ setTimeout(() => { jQuery('#suggestion-section-textarea').focus(); jQuery('#suggestion-modal-alert').hide(); }, 3000); } } document.querySelector('.suggest-bottom-btn').addEventListener('click', function(){ jQuery('body').append('
'); jQuery('.spinner-loading-overlay').show(); if(loginData && loginData.isLoggedIn) { suggestionCall(); return; } // load the captcha script and set the token loadScript('https://www.google.com/recaptcha/api.js?render=6LdMFNUZAAAAAIuRtzg0piOT-qXCbDF-iQiUi9KY',[], function() { setGoogleRecaptcha(); }); }); $('.improvement-bottom-btn.create-improvement-btn').click(function() { //create improvement button is clicked $('body').append('
'); $('.spinner-loading-overlay').show(); // send this option via create-improvement-post api jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.improvement-reason-modal').hide(); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { $('.spinner-loading-overlay:eq(0)').remove(); var result = e.responseJSON; if(result.detail.non_field_errors.length){ $('.improve-modal--improve-content .improve-modal--improve-content-modified').text(`${result.detail.non_field_errors}.`); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); $('.improvement-reason-modal').hide(); } }, }); });