1. Create a loop that evaluates up to 350. The clause of this loop increments by the power of 2. Each time the clause evaluates, the string I’m a Genius should print with the correspond value of the iterator printed with it.
Answer in Python Please
1.
given :
create a loop
range 0-350
loop increaments =2i
print ==> 'i am genius' and iterator
code:
''' python 3
from the question loop evaluates up to 350
range is 0-350 with increaments of 1
clause of loop increments by power of 2
so creating a variable x with pow function
checking for conditionals and printing the result'''
for iterator in range(0,350,1):
x=pow(2,iterator)
while x<=350:
print('I\'m a Genius : {}'.format(iterator))
break
if x>350:
break
sample screenshot:

'
1. Create a loop that evaluates up to 350. The clause of this loop increments by...
Using Python 3.x to solve this problem
Create a class called ASCIIDecoder this class should: A. Be an iterable object _iter_) B. Be an iterator _next_) Since it is an iterator of itself, the_iter__call should just initialize any variables used for iteration and return self. Functionally the ASCII decoder is initialized with a string and when iterated returns the ordinal (numeric) value for one character at a time...chr) and ord) are functions that can convert to and from ASCIl values....
Answer in python please and use loop
Question 2: Write a program that prompts the user to enter a sentence string. The program will either print True if the sentence contains every letter of the alphabet. If the sentence does not contain each letter, print which letters are missing. The results should not depend on capitalization. Hint: a loop may be very handy in the solution.
Python Print integer numbers up to 100 (1, 2, 3, …..) using a while loop. Each integer number takes a separate line.
I need help with this python programming exercise, please!
thanks in advance
Create a Python script file called hw4.py. Add your name at the top as a comment, along with the class name and date. Both exercises should be in this file, with a comment before each of them to mark it. Ex. 1. Write a program that inputs an integer number from the user, then prints a letter "O" in ASCII art using a width of 5 and the...
Part 1: Using Idle Write a Python Script that Does the Following 1. At the top of your program, import the math library as in from math import * to make the functions in the math module available. Create a variable and assign into it a constant positive integer number of your choice. The number should be at most 10. 1 Suppose we call this variable x for this writeup document Try something like x = 4 2. Create another...
Task 1: String with Loop • Write a program that reads a sentence and use a loop that counts how many elements in a string that are equal to ‘t’. Task 2: List with Function • Write a function fill that fills all elements of a list with a given value. • For example: o The call fill(scores, 13) should fill all elements of the list scores with the value 13. • Write a demo program to show how this...
Use Python Spyder to answer: First List – Loop (one that you created in lab 1 or any new list) • Repeat First List, but this time use a loop to print out each value in the list. First Neat List - Loop • Repeat First Neat List, but this time use a loop to print out your statements. Make sure you are writing the same sentence for all values in your list. Loops are not effective when you are...
Create a loop that will populate a listbox with random values 14 pts The random numbers should range for ranging from 0 to 10 (10 must be a potential number that will be added). Keep adding values to the listbox until the sum of the values in the listbox equals or exceeds 100. After adding the values, tell me how many items are in the listbox, and the sum of the numbers, displaying these values in labels. Create a...
In Python! Create the program that print out only odd numbers 1,3,5,7,9 Use either a while loop or a for loop to print only odd numbers 1, 3, 5, 7, 9 *tip: you can use range () function, or a condition with ‘break’ (e.g, while count < 10) In python!: Create a program that print out 12 months of a year and associated numbers (e.g., January 1, February 2…). Two lists should be created, and then loop through the list...
Using Python programming, create a 2-by-3 list, then use a nested loop to: 1) Set each element's value to an integer indicating the order in which it was processed by the nested loop (1, 2, 3, 4, 5, 6). 2) Display the elements in tabular format. Use the column indices as headings across the top, and the row indices to the left of each row.