subject

What is the python code for these problems (100 points): Ask the user to enter a name. If there is an ‘a’ in the name, print a message saying ‘The name contains at least one a.’ If there is no ‘a’, print “The name does not contain the letter a.” Extend the previous program and count the number of a’s that come in the name. Ask the user to enter a number. If the number is between 1 and 50, print “The number is too small.” If the number is between 50 and 100, print “The number is too big.” If the number is 50, print “You found me.” If the number is 100, print “You found a tip: The number is between 45 and 60.” The program should keep asking the user for the number until he enters 50. Use a for loop to print numbers from 10 to 40. Ask the user to enter a number. Print all the even numbers till that number using a for loop. Generate a random integer. It can be any number from 1 to 100. Print numbers from 1 to that number. Repeat question 4. Replace the for loop with a while loop. Thanks so much!!!

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:20, Jadaaaaaaan
Your program will make use of long long int variables for all calculations. note: the use of long long int requires that you have c++11 support. you should have this automatically if you are using a newer version of visual studio. the support is there for gcc as well, but you may need the -std=c++11 or -std=c++0x compiler flag. you first need to read in the total number of seconds. there is no prompt for the read (that is, you just do the cin without using a cout to display a prompt). this is going to seem a little strange when you are running your program in your ide
Answers: 2
image
Computers and Technology, 24.06.2019 02:00, akatherine1738
What is a loop? a. a collection of function definitions at the top of a program b. a line of code that defines a variable and assigns it a value c. a program that opens the turtle graphics window d. a block of code that repeats a specific number of times
Answers: 1
image
Computers and Technology, 24.06.2019 09:50, potatocow
Self contained sequences of actions to be performed are? a. expressions b. algorithms c. functions d. formulas
Answers: 1
image
Computers and Technology, 25.06.2019 01:00, mrstealyogirl40
Holly created a professional development plan to explore how she could advance from her entry-level position to the next step in her career. she has identified her current skills and the skills needed for the job she wants. what should she do now? a) ask a colleague for advice about work-life balance b) identify her areas for improvement c) plan a vacation before she begins her new job d) wait until a position opens before continuing her plan
Answers: 1
You know the right answer?
What is the python code for these problems (100 points): Ask the user to enter a name. If there is a...

Questions in other subjects: