Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

This part consists of 4 questions. You should attempt all questions. You should dedicate approximately 45 minutes for this part. Question 1: [6 marks] What

image text in transcribed
This part consists of 4 questions. You should attempt all questions. You should dedicate approximately 45 minutes for this part. Question 1: [6 marks] What will the following program display if the user intends to enter the following values one after another? 5,6,0,21,7,14 def num List(): global list liste [] x= int(input("Enter a non-negative integer, any negative integen to stop ")) while x>=0 : list. append (x) x=int (input("Enter a non-negative integer, any negative integer to stop ")) num_List() my_Iist =[] for item in list: if item\%3 =0 or item\%7=a: my list.append (item) print(my_list)

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_2

Step: 3

blur-text-image_3

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

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students explore these related Databases questions