Answer:
Following are the program in python language
def prob3_6(k): #function definition
c = 0 #variable declaration
while k != 1: #iterating the while loop
print(k) #print k
if k % 2 == 0:#check if condition
k= k // 2 #divisible by 2
else: #else condition
k = k * 3 + 1
c = c + 1
print(k) #print k
print c #print count
prob3_6(3)#function call
Output:
3
10
5
16
8
4
2
1
7
Explanation:
Following are the description of program
- Create a function "prob3_6" in this function we passing an integer parameter of type "int" named "k".
- Inside that function we declared a variable "c" of type "int" that is used for counting purpose .
- After that we iterated the while for print the value of when it is not equal to 1 .
- We check if condition when k gives 0 on modulus then k is divisible by 2 otherwise else block will be executed in the else part we multiply by 3 to k and add 1 to the k variable .
- Finally print "k" and "c"
Making charts, files that need complicated calculations
These are the steps you would take..
click on insert at the bar on the top of the document processor (Word,Google Docs ect.) >>Click table drag as many columns and rows as you need!
I hope this helps!
Link a GPO to the Marketing OU. In the GPO, edit the Enable client-side targeting policy and specify the Marketing Computers group.
In the WSUS console, edit the options for Computers and specify Use Group Policy or registry settings on computers.
In the WSUS console, create a Marketing Computers group.
True. Mobile devices need to work within limited screen space. Mobile devices are designed to be portable and designed to be carried around without hassle. Mobile devices are used for personal activities such as talking privately, chatting and many more that is why it is designed to be small.