Categories: Uncategorized

complete following exercises in Python Programming Language

complete following exercises in Python Programming Language Create two variablesx and yenter x = 3 and y = 3Task1
Create nested list based on x and y
for example as mentioned above and fill them with 0
[[0,0,0],
[0,0,0]
[0,0,0]]
if I enter x = 4, y = 4
the list should be
[[0,0,0,0],
[0,0,0,0],
[0,0,0,0],
[0,0,0,0]]
Task2
Now create nested list again and this time you need to check
if
x MOD y is equal to zero then in that index fill with 1 otherwise fill with zero
Note: mod operator in python is % so you need to do X % Y also note 0 % 0 or 0 % 1 will throw exception so find solution for this hint add + 1
this List can be like this Note this is just example
[[1,0,0],
[0,1,0]
[0,0,1]]
Task 3
Traverse over these lists and if you find 1 the print index of that list
Convert X and Y into functions in the end for all 3 Tasks
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code “Newclient”

The post complete following exercises in Python Programming Language appeared first on Superb Professors.

"Order a Custom Paper on Similar Assignment! No Plagiarism! Enjoy 20% Discount"

Superbprofessors

Recent Posts

case study one page case study one page case study one page case study one page case study one page

Case study one page Case study one page Case study one page Case study one…

2 years ago

business calculus quiz

Business Calculus quiz that is 10 questions and has an hour time limit. Must be…

2 years ago

hnif 355 disscussion post

Write a 175- to 265-word response to the following: What constitutes “robust interoperability,” and what…

2 years ago

news briefing quest 2

For this News Briefing Quest task , pick and analyze a U.S. political news article…

2 years ago

acc610 final project milestone two critical element ii analysis of financial statements

ACC 610 Milestone TwoGuidelines and Rubric This is the secondof three milestone assignments that will…

2 years ago

write in complete paragraphs 5 pages

Please answer the questions in the attachment. I have sent you the required materials. Send…

2 years ago