Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer all questions Question 1 (5 points): Write the following mathematical formula in Python: 882 result 60 +11 46 Assume a = 2, b =

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Answer all questions Question 1 (5 points): Write the following mathematical formula in Python: 882 result 60 +11 46 Assume a = 2, b = 3. c = 2 Make sure your code shows the value of the variable result as the output,color="red"> In 1: fwrite your code here: Question 2 (5 points): Fill the blanks in the following cell based on the instructions. In [ ]: message = 'Hello everybody!! message.split() #sperate the text based on the space character. print(message[ : 1) # print only Hello. New_message= message. # replace ! with the red heart emoy. # Simply replace with \u2764\ufe0f1 print(New_message) Question 3 (5 points): Fill the parts of the code below. In [ ]: Let's create an empty list my_list = [1, list() # Let's add some values my_list.append('Python) my_list. ('is ok) my_list. (sometimes) # Let's remove sometimes my_list. (sometimes) # Let's change the second item my_list[1 is neat Question 4 (5 points): Consider the following list. In (): Listofnums = [[@],[1,2,3], [4,5,6,7], [8,9,10]] 4.1. Using list indices print the second element of the list. In [ ]: # write your code here: 4.2. Using list indices, print out elements 0,3,4,9. In ( ): # write your code here: Question 5 (5 points): Write a program that based on the following table provides students's grades. Use input function to get students' score and the output of the code is the lotter grade Score Grade 00 A O 00 170-30) Moro) The square and round brackets donate closed and open intervals. A closed interval includes the number, and open interval excludes it. So 79.99999 gets gradec, but But grade 8 in write your onder here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

1583474013, 978-1583474013

More Books

Students also viewed these Databases questions

Question

View writing as a strategic tool

Answered: 1 week ago