Please do 34-44 questions . These are for the Python program .

64 Chapter An Introduction to Programming 34. Given that the variable named Boy - Joey and the variable named A create statements that will output the following message. Use a variable Congratulations, Joey! Today you are 6 years old. 35. If Nane1 - John and Name2 - Smith, what string results from each named Message to store the message. following operations? Nanel . drement, that p des de blepruer. followed by the b. Name2Name 1 36. Write a pair of statements that prompts for and inputs the user 37 Write a pair of statements that prompts for and inputs an i Write a series of statements that does the following: Inputs the users age (including a suitable promp). 38. .Subtracts 5 from the number entered by the user. . Displays the message You dont look a day over fol number computed in the previous step. 39. Write a series of statements that does the following Step 1 Inputs the price of an item, in dollars, from the user Step 3 Displays the message Thats only, followed by the numb Suppose that Number1-15 and Number2-12 are both of Inteon user (including a suitable prompt). Step 2 Divides the number entered in Step 1 by 1.62 puted in Step 2, followed by the message in British 40, the two possible values (depending on the programming la Numberl/Number2. nguage in usejd is now, Text2= years old., and Age 24, th 41. IfName1 = Marcy. Text!- what will be output after the following operation: Name1 +Textl + Age +Text2 acter2 also a single character? Exercises 43-50 refer to the following program: 42. If Character1 and Character2 are single characters, is Set Numberl 4 Set Number1 = Number1 + 1 Set Number2 = 3 Set Number2 Number1 Number2 Write Number2 43. List the variables in the program. 44. What are the programs Input statements? b. Assignment statements? e. Output statements? 64 Chapter An Introduction to Programming 34. Given that the variable named Boy – “Joey” and the variable named A create statements that will output the following message. Use a variable Congratulations, Joey! Today you are 6 years old. 35. If Nane1 – “John” and Name2 – Smith”, what string results from each named Message to store the message. following operations? Nanel . drement, that p des de blepruer. followed by the b. Name2Name 1 36. Write a pair of statements that prompts for and inputs the user’ 37 Write a pair of statements that prompts for and inputs an i Write a series of statements that does the following: Inputs the user’s age (including a suitable promp). 38. .Subtracts 5 from the number entered by the user. . Displays the message “You don’t look a day over” fol number computed in the previous step. 39. Write a series of statements that does the following Step 1 Inputs the price of an item, in dollars, from the user Step 3 Displays the message “That’s only”, followed by the numb Suppose that Number1-15 and Number2-12 are both of Inteon user (including a suitable prompt). Step 2 Divides the number entered in Step 1 by 1.62 puted in Step 2, followed by the message “in British 40, the two possible values (depending on the programming la Numberl/Number2. nguage in usejd “is now”, Text2=” years old.”, and Age 24, th 41. IfName1 = “Marcy”. Text!- what will be output after the following operation: Name1 +Textl + Age +Text2 acter2 also a single character? Exercises 43-50 refer to the following program: 42. If Character1 and Character2 are single characters, is Set Numberl 4 Set Number1 = Number1 + 1 Set Number2 = 3 Set Number2 Number1 Number2 Write Number2 43. List the variables in the program. 44. What are the program’s Input statements? b. Assignment statements? e. Output statements?



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *