Python Quiz for beginners by filler

View this thread on steempeak.com
· @filler ·
$1.61
Python Quiz for beginners
![Capture.JPG](https://cdn.steemitimages.com/DQmZeh7qHEc8uSs7oBKpFFatCeDYykp9SAyy4LJ3AgzkK6A/Capture.JPG)

* What is the output?

for i in range(10, 25, 3):
  print( i, end=', ')

answer - 10, 13, 16, 19, 22, 

* def calculate (num1, num2=4):
  res = num1 * num2
  print(res)

calculate(5, 7)

answer - 35

* The output is?

salary = 9000

def printSalary():
  salary = 11000
  print("Salary:", salary)
  
printSalary();
print("Salary:", salary)

answer - Salary: 11000
                   Salary: 9000

* Is a string immutable?
When we modify a string, Python creates a new one and assigns a new string to a new variable

True or false?

Answer - True

* Output?
 str = "pynative"
print (str[1:4])


answer - yna

* x = 36 / 4 * (7 +  2) * 4 + 3
print(x)

answer - 327

image -screenshot
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 113 others
properties (23)
post_id81,348,633
authorfiller
permlinkpython-quiz-for-beginners
categorycoding
json_metadata{"tags":["coding","python","neoxian"],"image":["https:\/\/cdn.steemitimages.com\/DQmZeh7qHEc8uSs7oBKpFFatCeDYykp9SAyy4LJ3AgzkK6A\/Capture.JPG"],"app":"neoxiancity\/0.1","format":"markdown","canonical_url":"https:\/\/www.neoxian.city\/@filler\/python-quiz-for-beginners"}
created2019-10-31 13:38:30
last_update2019-10-31 13:38:30
depth0
children0
net_rshares6,851,534,669,369
last_payout2019-11-07 13:38:30
cashout_time1969-12-31 23:59:59
total_payout_value0.792 SBD
curator_payout_value0.818 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length787
author_reputation3,668,127,682,393
root_title"Python Quiz for beginners"
beneficiaries
0.
accountneoxianburn
weight500
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (177)