• Register
0 votes
230 views

Problem:

The Python language is not sensitive to block structuring of code.

5 3 2
7,520 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution:

True

Explanation:

The Python language is not sensitive to block structuring of code. The if statement causes one or more statements to execute only when a Boolean expression is true. Python allows you to compare strings, but it is not case sensitive. ... The not operator is a unary operator which must be used in a compound expression.

 

Another Explanation:

In computer programming, a block or code block is a lexical structure of source code that is grouped together. ... A programming language that permits the creation of blocks, including blocks nested within other blocks, is called a block-structured programming language. The Python language is not sensitive to block structuring of code. The if statement causes one or more statements to execute only when a Boolean expression is true. A code block is a piece of Python program text that can be executed as a unit, such as a module, a class definition or a function body. 

6 4 2
14,580 points

Related questions

0 votes
1 answer 91 views
91 views
I am new to python programming. I was trying to compare two strings, I wrote a code to compare: YourStr = "one" MyStr = "one" if YourStr = MyStr print("Two strings are same") else print("Two strings are not same") But it gives an error: File "main.py", line 4 if YourStr = MyStr ^ SyntaxError: invalid syntax Whats wrong in my code and how can I compare two string but it is not case sensitive?
asked Mar 16, 2020 LizzyM 6.1k points
0 votes
1 answer 51 views
51 views
I am new to this. I just want to know how to do that?
asked Nov 30, 2020 TeamScript 13.5k points
0 votes
1 answer 259 views
259 views
Problem : I am facing a lot of errors with the below message : “DatabaseError: current transaction is aborted, commands ignored until end of transaction block” Whenever I tried to change from the python-psycopg to the python-psycopg2 as my Django project's database engine. My code remains the same, just unable to know where those errors are coming from ?
asked Jan 4, 2020 alecxe 7.5k points
0 votes
1 answer 90 views
90 views
Problem : I am having hell lot of troubles because of below error message internalerror: current transaction is aborted, commands ignored until end of transaction block
asked Nov 14, 2019 peterlaw 6.9k points
0 votes
2 answers 48 views
48 views
How do I get a size of a pictures sides with PIL or any other Python library?
asked Oct 26, 2020 psandprop 2.4k points
0 votes
1 answer 128 views
128 views
Problem : Facing following issue related to list in Python given that a refers to a list, write the necessary code to reverse the elements of the list.
asked Nov 16, 2019 peterlaw 6.9k points
0 votes
1 answer 13 views
13 views
Problem: How many except statements can a try-except block have? Explanation: There has to be at least one except statement. 2.In the try clause, all statements are executed until an exception is encountered. except is used to catch and handle the exception(s) ... encountered in the try clause. else lets you code sections that should run only when no exceptions are encountered in the try clause.
asked Jan 26 Mashhoodch 9.3k points
0 votes
1 answer 28 views
28 views
Problem: Let me start off by saying that I am COMPLETELY new to programming. I have just recently picked up Python and it has consistently kicked me in the head with one recurring error -- "expected an indented block" Now, I know there are several other ... indentation has not given me better results. I have replaced all of my indents with 4 spaces and even rewritten the code several times.
asked Jan 10 Mashhoodch 9.3k points
1 vote
1 answer 874 views
874 views
Problem: I have a data frame to count my daily costs and when I try to input this to my cost using python script it always shows the error: TypeError: Object of type 'int64' is not JSON serializable The script I wrote is: ... update_list.append(update_data) all_data_cursor = all_datapull.costforce_login() all_data_cursor.bulk.Account.update(update_list) Can anyone help me out to fix this thing.
asked Apr 7, 2020 LizzyM 6.1k points
1 vote
1 answer 17 views
17 views
Problem: To check whether the input is Floating point number or not in python I wrote this program: import re # check Floating point number def checked(floatnum): # pass the regular expression # and the string in search() method if(re.search(floatnum)): print( ... line 9, in checked if(re.search(floatnum)): TypeError: search() missing 1 required positional argument: 'string' Can anyone solve this?
asked Apr 28, 2020 samhaz 5k points