Tuesday, January 18, 2022
Write a function 'problem1_6()' that prints the odd numbers from 1 through 100. Make all of these numbers appear on the same line (actually, when the line fills up it will wrap around, but ignore that.). In order to do this, your print statement should have end=" " in it. For example, print(name,end=" ") will keep the next print statement from starting a new line. Be sure there is a space between these quotes or your numbers will run together. Use a single space as that is what the grading program expects. Use a 'for' loop and a range() function
Subscribe to:
Post Comments (Atom)
How to get free course on Coursera with cirtificate ? , coursera Financial aid questions & answers :
Coursera Financial aid questions & answers Q1) Why are you applying for Financial Aid? ans:- I am in my second year of B.Tech in ...
-
def problem1_4(miles): print("There are",miles*5280,"feet in",miles,"miles....
-
def problem1_3(n): sum=0 i=0 while i Copy
No comments:
Post a Comment